Per Interpreter Statistic
A PerInterpreterStatistic is an incremental, summarized recording of a set of integral values and times. It is synchronized, although the typical usage is that it will only be written by a single Thread at a time, and read by another Thread only rarely.
If you want to record samples from multiple processes, use a Statistic, which holds a PerInterpreterStatistic for up to AvailRuntimeConfiguration.maxInterpreters separate Threads to access, without any locks.
Author
Mark van Gulik
Parameters
The number of samples.
The minimum sample.
The maximum sample.
The mean of the samples.
The sum of squares of differences of the samples from the mean.
Functions
Default sort is descending by sum.
Describe this statistic as though its samples are durations in nanoseconds.
Record a new sample, updating any cumulative statistical values. This is thread-safe. However, the locking cost is very low due to a spinlock, as long as there's very low contention. Since Statistic partitions use of PerInterpreterStatistics by Interpreter (and hence by Thread), the contention is non-existent, except when accumulating stats to print.