BinaryHistogram

An integer, binary logarithmic statistics counter

Members

Functions

add
ulong add(ulong n)

Adds the specified value to the histogram, incrementing the corresponding bin and the total number of transactions and adding n to the total count.

countFor
ulong countFor()

Gets the count of transactions in the specified bin.

mean
double mean()
stats
Bins stats()

Variables

count
uint count;

The total number of calls to add().

total
ulong total;

The aggregated total from all calls to add().

Parameters

MaxPow2

the maximum power of two that is tracked in the lower bins of the counter. Any values >= 2^MaxPow2 will be aggregated in the upper bin.

Suffix

suffix for the names of the fields of the Bins accessor struct

Meta