A record that calculates the min, max, and average from integer samples. More...
Public Member Functions | |
void | addSample (long longSample) |
Adds a new sample to the calculation. More... | |
DiagnosticSampler () | |
Creates a new instance of the DiagnosticRecord. More... | |
DiagnosticSampler (int averageSampleCount) | |
Creates a new instance of the DiagnosticRecord. More... | |
DiagnosticSampler (int averageSampleCount, String label) | |
Creates a new instance of the DiagnosticRecord. More... | |
DiagnosticSampler (String label) | |
Creates a new instance of the DiagnosticRecord. More... | |
double | getAverage () |
Gets the average of all samples. More... | |
long | getCount () |
Gets how many samples this record has used. More... | |
String | getLabel () |
Gets the label for this sampler. More... | |
long | getLastValue () |
Gets the value of the last sample recorded. More... | |
long | getMax () |
Gets the maximum sample ever recorded. More... | |
long | getMin () |
Gets the minimum sample ever recorded. More... | |
int | getSamplesInAverage () |
Gets how many samples are included in the average. More... | |
long | getSum () |
Gets the sum of all values. More... | |
A record that calculates the min, max, and average from integer samples.
fm.liveswitch.DiagnosticSampler.DiagnosticSampler | ( | ) |
Creates a new instance of the DiagnosticRecord.
fm.liveswitch.DiagnosticSampler.DiagnosticSampler | ( | int | averageSampleCount | ) |
Creates a new instance of the DiagnosticRecord.
averageSampleCount | How many samples to include in the average. |
fm.liveswitch.DiagnosticSampler.DiagnosticSampler | ( | int | averageSampleCount, |
String | label | ||
) |
Creates a new instance of the DiagnosticRecord.
averageSampleCount | How many samples to include in the average. |
label | The label for this sampler. |
fm.liveswitch.DiagnosticSampler.DiagnosticSampler | ( | String | label | ) |
Creates a new instance of the DiagnosticRecord.
label | The label for this sampler. |
void fm.liveswitch.DiagnosticSampler.addSample | ( | long | longSample | ) |
Adds a new sample to the calculation.
longSample | The sample to add. |
double fm.liveswitch.DiagnosticSampler.getAverage | ( | ) |
Gets the average of all samples.
long fm.liveswitch.DiagnosticSampler.getCount | ( | ) |
Gets how many samples this record has used.
String fm.liveswitch.DiagnosticSampler.getLabel | ( | ) |
Gets the label for this sampler.
long fm.liveswitch.DiagnosticSampler.getLastValue | ( | ) |
Gets the value of the last sample recorded.
long fm.liveswitch.DiagnosticSampler.getMax | ( | ) |
Gets the maximum sample ever recorded.
long fm.liveswitch.DiagnosticSampler.getMin | ( | ) |
Gets the minimum sample ever recorded.
int fm.liveswitch.DiagnosticSampler.getSamplesInAverage | ( | ) |
Gets how many samples are included in the average.
long fm.liveswitch.DiagnosticSampler.getSum | ( | ) |
Gets the sum of all values.