gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Attributes | List of all members
Stats::DistStor Class Reference

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...
 

Detailed Description

Templatized storage and interface for a distribution stat.

Definition at line 1366 of file statistics.hh.

Constructor & Destructor Documentation

Stats::DistStor::DistStor ( Info info)
inline

Definition at line 1411 of file statistics.hh.

References reset().

Member Function Documentation

void Stats::DistStor::prepare ( Info info,
DistData data 
)
inline
void Stats::DistStor::reset ( Info info)
inline
void Stats::DistStor::sample ( Counter  val,
int  number 
)
inline

Add a value to the distribution for the given number of times.

Parameters
valThe value to add.
numberThe 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.

size_type Stats::DistStor::size ( ) const
inline

Return the number of buckets in this distribution.

Returns
the number of buckets.

Definition at line 1451 of file statistics.hh.

References cvec.

Referenced by reset(), and sample().

bool Stats::DistStor::zero ( ) const
inline

Returns true if any calls to sample have been made.

Returns
True if any values have been sampled.

Definition at line 1458 of file statistics.hh.

References samples.

Member Data Documentation

Counter Stats::DistStor::bucket_size
private

The number of entries in each bucket.

Definition at line 1391 of file statistics.hh.

Referenced by reset(), and sample().

VCounter Stats::DistStor::cvec
private

Counter for each bucket.

Definition at line 1408 of file statistics.hh.

Referenced by prepare(), reset(), sample(), and size().

Counter Stats::DistStor::max_track
private

The maximum value to track.

Definition at line 1389 of file statistics.hh.

Referenced by reset(), and sample().

Counter Stats::DistStor::max_val
private

The largest value sampled.

Definition at line 1396 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

Counter Stats::DistStor::min_track
private

The minimum value to track.

Definition at line 1387 of file statistics.hh.

Referenced by reset(), and sample().

Counter Stats::DistStor::min_val
private

The smallest value sampled.

Definition at line 1394 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

Counter Stats::DistStor::overflow
private

The number of values sampled more than max.

Definition at line 1400 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

Counter Stats::DistStor::samples
private

The number of samples.

Definition at line 1406 of file statistics.hh.

Referenced by prepare(), reset(), sample(), and zero().

Counter Stats::DistStor::squares
private

The sum of squares.

Definition at line 1404 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

Counter Stats::DistStor::sum
private

The current sum.

Definition at line 1402 of file statistics.hh.

Referenced by prepare(), reset(), and sample().

Counter Stats::DistStor::underflow
private

The number of values sampled less than min.

Definition at line 1398 of file statistics.hh.

Referenced by prepare(), reset(), and sample().


The documentation for this class was generated from the following file:

Generated on Fri Jun 9 2017 13:04:39 for gem5 by doxygen 1.8.6