Add a gauge function, which is used to sample instantaneous values.
Add a gauge function, which is used to sample instantaneous values.
Attach a new StatsListener to this collection.
Attach a new StatsListener to this collection. Additions to metrics will be passed along to each listener.
Adds a set of values to a named metric.
Adds a set of values to a named metric. Effectively the incoming distribution is merged with the named metric.
Adds a value to a named metric, which tracks min, max, mean, and a histogram.
Adds a value to a named metric, which tracks min, max, mean, and a histogram.
Reset all collected stats and erase the history.
Reset all collected stats and erase the history. Probably only useful for unit tests.
Remove a gauge from the provided stats.
Remove a gauge from the provided stats.
Clear an existing label.
Clear an existing label.
Use JMX (shudder) to fill in stats about the JVM into a mutable map.
Use JMX (shudder) to fill in stats about the JVM into a mutable map.
Flush this collection's counters and metrics into the global Stats
object, with each counter
and metric name prefixed by this collection's name.
Flush this collection's counters and metrics into another StatsCollection, with each counter and metric name prefixed by this collection's name.
Flush this collection's counters and metrics into another StatsCollection, with each counter and metric name prefixed by this collection's name. Counters and metrics in this collection will be cleared out. This is not an atomic operation.
Summarize all the counters, metrics, gauges, and labels in this collection.
Summarize all the counters, metrics, gauges, and labels in this collection.
Get the Counter object representing a named counter.
Get the Counter object representing a named counter.
Summarize all the counters in this collection.
Summarize all the counters in this collection.
Get the current value of a named gauge.
Get the current value of a named gauge.
Summarize all the gauges in this collection.
Summarize all the gauges in this collection.
Get the current value of a named label, if it exists.
Get the current value of a named label, if it exists.
Summarize all the labels in this collection.
Summarize all the labels in this collection.
Get the Metric object representing a named metric.
Get the Metric object representing a named metric.
Summarize all the metrics in this collection.
Summarize all the metrics in this collection.
Set this to true to have the collection fill in a set of automatic gauges from the JVM.
Set this to true to have the collection fill in a set of automatic gauges from the JVM.
Increments a counter by one, returning the new value.
Increments a counter by one, returning the new value.
Increments a counter, returning the new value.
Increments a counter, returning the new value.
Set a gauge to a specific value.
Set a gauge to a specific value. This overwrites any previous value or function.
Set a label to a string.
Set a label to a string.
Runs the function f and logs that duration, in milliseconds, with the given name.
Runs the function f and logs that duration, in milliseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in microseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in microseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in milliseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in milliseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in nanoseconds, with the given name.
Runs the function f and logs that duration until the future is satisfied, in nanoseconds, with the given name.
Runs the function f and logs that duration, in microseconds, with the given name.
Runs the function f and logs that duration, in microseconds, with the given name.
Runs the function f and logs that duration, in nanoseconds, with the given name.
Runs the function f and logs that duration, in nanoseconds, with the given name.
A StatsCollection that sends counter and metric updates to the global
Stats
object as they happen, and can be asked to flush its stats back into another StatsCollection with a prefix.For example, if the prefix is "transaction10", then updating a counter "exceptions" will update this collection and
Stats
simultaneously for "exceptions". When/if the collection is flushed intoStats
at the end of the transaction, "transaction10.exceptions" will be updated with this collection's "exception" count.