com.sleepycat.utilint
Class LatencyStat

java.lang.Object
  extended by com.sleepycat.utilint.LatencyStat
All Implemented Interfaces:
Cloneable

public class LatencyStat
extends Object
implements Cloneable

A stat that keeps track of latency in milliseconds and presents average, min, max, 95th and 99th percentile values.


Constructor Summary
LatencyStat(long maxTrackedLatencyMillis)
           
 
Method Summary
 Latency calculate()
          Generated the min, max, avg, 95th and 99th percentile for the collected measurements.
 Latency calculateAndClear()
          Generated the min, max, avg, 95th and 99th percentile for the collected measurements, then clear the measurement collection.
 void clear()
           
 boolean isEmpty()
           
 void rollup(LatencyStat other)
          Add the measurement in "other" to the measurements held here, in order to generate min, max, avg, 95th, 99th percentile for two Latency Stats.
 void set(int numRecordedOps, long nanoLatency)
          Record a set of operations that took "nanolatency" long.
 void set(long nanoLatency)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatencyStat

public LatencyStat(long maxTrackedLatencyMillis)
Method Detail

clear

public void clear()

calculate

public Latency calculate()
Generated the min, max, avg, 95th and 99th percentile for the collected measurements. Do not clear the measurement collection.


calculateAndClear

public Latency calculateAndClear()
Generated the min, max, avg, 95th and 99th percentile for the collected measurements, then clear the measurement collection.


set

public void set(long nanoLatency)

set

public void set(int numRecordedOps,
                long nanoLatency)
Record a set of operations that took "nanolatency" long.


rollup

public void rollup(LatencyStat other)
Add the measurement in "other" to the measurements held here, in order to generate min, max, avg, 95th, 99th percentile for two Latency Stats.


isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2012 Oracle. All rights reserved.