record

fun record(sample: Double)

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.

Parameters

sample

The sample value to record.