Class Metrics
java.lang.Object
org.jpos.util.Metrics
- All Implemented Interfaces:
Loggeable
-
Constructor Summary
ConstructorsConstructorDescriptionMetrics(org.HdrHistogram.Histogram template) Constructs a Metrics instance using the given Histogram as a template for new buckets. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintStream ps, String indent) Dumps all metric percentile summaries to the given stream.voiddumpHistograms(File dir, String prefix) Writes HDR histogram files for all metrics to the given directory.metrics()Returns a snapshot copy of all recorded histograms.Returns a snapshot copy of all histograms whose name starts with the given prefix.voidRecords an elapsed time observation for the named metric.voidsetConversion(double conversion) Sets the conversion divisor applied to percentile values during dump.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Loggeable
dumpModifier and TypeMethodDescriptiondefault voiddump(PrintStream p, String indent, LogRenderer.Type type) Dumps a representation of this object using the specified renderer type.
-
Constructor Details
-
Metrics
Constructs a Metrics instance using the given Histogram as a template for new buckets.- Parameters:
template- the Histogram template; may benull
-
-
Method Details
-
metrics
-
metrics
-
record
-
dump
Dumps all metric percentile summaries to the given stream. -
dumpHistograms
Writes HDR histogram files for all metrics to the given directory.- Parameters:
dir- output directoryprefix- filename prefix for histogram files
-
setConversion
Sets the conversion divisor applied to percentile values during dump.- Parameters:
conversion- This is used to divide the percentile values while dumping. If you are using nano seconds to record and want to display the numbers in millis then conversion can be set to 1000000. By default conversion is set to 1.
-