gem5
|
Templatized storage and interface for a distribution stat. More...
#include <statistics.hh>
Classes | |
struct | Params |
The parameters for a distribution stat. More... | |
Public Member Functions | |
DistStor (Info *info) | |
void | sample (Counter val, int number) |
Add a value to the distribution for the given number of times. More... | |
size_type | size () const |
Return the number of buckets in this distribution. More... | |
bool | zero () const |
Returns true if any calls to sample have been made. More... | |
void | prepare (Info *info, DistData &data) |
void | reset (Info *info) |
Reset stat value to default. More... | |
Private Attributes | |
Counter | min_track |
The minimum value to track. More... | |
Counter | max_track |
The maximum value to track. More... | |
Counter | bucket_size |
The number of entries in each bucket. More... | |
Counter | min_val |
The smallest value sampled. More... | |
Counter | max_val |
The largest value sampled. More... | |
Counter | underflow |
The number of values sampled less than min. More... | |
Counter | overflow |
The number of values sampled more than max. More... | |
Counter | sum |
The current sum. More... | |
Counter | squares |
The sum of squares. More... | |
Counter | samples |
The number of samples. More... | |
VCounter | cvec |
Counter for each bucket. More... | |
Templatized storage and interface for a distribution stat.
Definition at line 1366 of file statistics.hh.
|
inline |
Definition at line 1411 of file statistics.hh.
References reset().
Definition at line 1464 of file statistics.hh.
References Stats::DistData::bucket_size, Stats::DistStor::Params::bucket_size, Stats::DistStor::Params::buckets, Stats::DistData::cvec, cvec, Stats::Dist, ArmISA::i, Stats::DistData::max, Stats::DistStor::Params::max, Stats::DistData::max_val, max_val, Stats::DistData::min, Stats::DistStor::Params::min, Stats::DistData::min_val, min_val, Stats::DistData::overflow, overflow, safe_cast(), Stats::DistData::samples, samples, Stats::DistData::squares, squares, Stats::Info::storageParams, Stats::DistData::sum, sum, Stats::DistData::type, Stats::DistParams::type, Stats::DistData::underflow, and underflow.
|
inline |
Reset stat value to default.
Definition at line 1492 of file statistics.hh.
References Stats::DistStor::Params::bucket_size, bucket_size, cvec, ArmISA::i, Stats::DistStor::Params::max, max_track, max_val, Stats::DistStor::Params::min, min_track, min_val, overflow, safe_cast(), samples, size(), squares, Stats::Info::storageParams, sum, and underflow.
Referenced by DistStor().
|
inline |
Add a value to the distribution for the given number of times.
val | The value to add. |
number | The number of times to add the value. |
Definition at line 1423 of file statistics.hh.
References bucket_size, cvec, MipsISA::index, max_track, max_val, min_track, min_val, overflow, samples, size(), squares, sum, underflow, and X86ISA::val.
|
inline |
Return the number of buckets in this distribution.
Definition at line 1451 of file statistics.hh.
References cvec.
|
inline |
Returns true if any calls to sample have been made.
Definition at line 1458 of file statistics.hh.
References samples.
|
private |
The number of entries in each bucket.
Definition at line 1391 of file statistics.hh.
|
private |
|
private |
The maximum value to track.
Definition at line 1389 of file statistics.hh.
|
private |
The largest value sampled.
Definition at line 1396 of file statistics.hh.
|
private |
The minimum value to track.
Definition at line 1387 of file statistics.hh.
|
private |
The smallest value sampled.
Definition at line 1394 of file statistics.hh.
|
private |
The number of values sampled more than max.
Definition at line 1400 of file statistics.hh.
|
private |
|
private |
The sum of squares.
Definition at line 1404 of file statistics.hh.
|
private |
The current sum.
Definition at line 1402 of file statistics.hh.
|
private |
The number of values sampled less than min.
Definition at line 1398 of file statistics.hh.