Go to the documentation of this file.
58 #ifndef __BASE_STATISTICS_HH__
59 #define __BASE_STATISTICS_HH__
91 template <
class Stat,
class Base>
106 visitor.
visit(*
static_cast<Base *
>(
this));
108 bool zero()
const {
return s.zero(); }
111 template <
class Stat>
122 template <
class Stat>
144 this->
s.result(rvec);
151 template <
class Stat>
158 template <
class Stat>
167 template <
class Stat>
212 bool zero()
const {
return true; }
222 template <
class Derived,
template <
class>
class InfoProxyType>
226 typedef InfoProxyType<Derived>
Info;
229 Derived &
self() {
return *
static_cast<Derived *
>(
this); }
281 const std::string &
name()
const {
return this->
info()->name; }
292 this->
info()->setSeparator(_sep);
297 return this->
info()->separatorString;
309 this->
info()->desc = _desc;
321 this->
info()->precision = _precision;
333 this->
info()->flags.set(_flags);
343 template <
class Stat>
347 this->
info()->prereq = prereq.info();
352 template <
class Derived,
template <
class>
class InfoProxyType>
356 typedef InfoProxyType<Derived>
Info;
359 const char *
desc =
nullptr)
376 Derived &
self = this->
self();
377 Info *
info =
self.info();
380 if (subn.size() <=
index)
381 subn.resize(
index + 1);
403 if (subd.size() <=
index)
404 subd.resize(
index + 1);
413 Derived &
self = this->
self();
416 size_t size =
self.size();
424 Derived &
self = this->
self();
427 size_t size =
self.size();
433 template <
class Derived,
template <
class>
class InfoProxyType>
437 typedef InfoProxyType<Derived>
Info;
451 Derived &
self = this->
self();
456 info->y_subnames[
i] = names[
i];
463 Derived &
self = this->
self();
466 assert(
index <
self.y);
467 info->y_subnames.resize(
self.y);
475 return this->
info()->y_subnames[
i];
651 template <
class Derived,
class Stor>
671 return reinterpret_cast<Storage *
>(storage);
683 return reinterpret_cast<const Storage *
>(storage);
702 const char *
desc =
nullptr)
731 template <
typename U>
739 template <
typename U>
747 template <
typename U>
794 template <
class T,
class Enabled=
void>
815 typename
std::enable_if<std::is_constructible<std::function<Result()>,
832 template <
class T,
class V>
847 template <
class Derived>
896 template <
class T,
class V>
927 template <
class Stat>
1004 template <
typename U>
1016 template <
typename U>
1028 template <
typename U>
1053 template <
class Derived,
class Stor>
1088 assert(
s > 0 &&
"size must be positive!");
1089 assert(!
storage &&
"already initialized");
1107 vec[
i] =
data(
i)->value();
1119 vec[
i] =
data(
i)->result();
1144 if (
data(
i)->zero())
1167 data(
i)->~Storage();
1168 delete []
reinterpret_cast<char *
>(
storage);
1179 Derived &
self = this->
self();
1193 return Proxy(this->
self(), index);
1197 template <
class Stat>
1208 typename Stat::Storage *
1215 const typename Stat::Storage *
1273 template <
class Derived,
class Stor>
1308 data(
i)->~Storage();
1309 delete []
reinterpret_cast<char *
>(
storage);
1315 assert(_x > 0 && _y > 0 &&
"sizes must be positive!");
1316 assert(!
storage &&
"already initialized");
1318 Derived &
self = this->
self();
1343 return Proxy(this->
self(), offset,
y);
1356 return data(0)->zero();
1553 min_val = CounterLimits::max();
1554 max_val = CounterLimits::min();
1681 int buckets = params->
buckets;
1682 data.cvec.resize(buckets);
1871 template <
class Derived,
class Stor>
1891 return reinterpret_cast<Storage *
>(storage);
1901 return reinterpret_cast<const Storage *
>(storage);
1923 template <
typename U>
1960 template <
class Stat>
1963 template <
class Derived,
class Stor>
1994 assert(
s > 0 &&
"size must be positive!");
1995 assert(!
storage &&
"already initialized");
2020 data(
i)->~Storage();
2021 delete []
reinterpret_cast<char *
>(
storage);
2027 return Proxy(this->
self(), index);
2040 if (!
data(
i)->zero())
2062 template <
class Stat>
2091 template <
typename U>
2107 return data()->zero();
2148 virtual std::string
str()
const = 0;
2182 template <
class Stat>
2204 return proxy.result();
2277 std::string tmp =
"(";
2291 static std::string
str() {
return "+"; }
2297 static std::string
str() {
return "-"; }
2303 static std::string
str() {
return "*"; }
2309 static std::string
str() {
return "/"; }
2315 static std::string
str() {
return "%"; }
2321 static std::string
str() {
return "-"; }
2387 assert(lvec.size() > 0 && rvec.size() > 0);
2389 if (lvec.size() == 1 && rvec.size() == 1) {
2392 }
else if (lvec.size() == 1) {
2397 }
else if (rvec.size() == 1) {
2402 }
else if (rvec.size() == lvec.size()) {
2423 assert(lvec.size() > 0 && rvec.size() > 0);
2424 assert(lvec.size() == rvec.size() ||
2425 lvec.size() == 1 || rvec.size() == 1);
2428 if (lvec.size() == rvec.size() && lvec.size() > 1) {
2433 return op(lsum, rsum);
2451 }
else if (
rs == 1) {
2454 assert(ls ==
rs &&
"Node vector sizes are not equal");
2539 const char *
desc =
nullptr)
2555 const char *
desc =
nullptr)
2565 const char *
desc =
nullptr)
2579 const char *
desc =
nullptr)
2593 const char *
desc =
nullptr)
2607 const char *
desc =
nullptr)
2621 const char *
desc =
nullptr)
2646 return this->
self();
2658 const char *
desc =
nullptr)
2675 return this->
self();
2690 const char *
desc =
nullptr)
2710 const char *
desc =
nullptr)
2727 const char *
desc =
nullptr)
2750 return this->
self();
2763 const char *
desc =
nullptr)
2780 return this->
self();
2793 const char *
desc =
nullptr)
2810 return this->
self();
2814 template <
class Stat>
2829 this->
s.result(vec);
2835 std::string
str()
const {
return this->
s.str(); }
2838 template <
class Stat>
2849 template <
class Derived,
class Stor>
2901 template <
typename U>
2987 MCounter::iterator it;
2989 for (it =
cmap.begin(); it !=
cmap.end(); it++) {
2990 data.cmap[(*it).first] = (*it).second;
3011 const char *
desc =
nullptr)
3027 return this->
self();
3049 const char *
desc =
nullptr);
3061 template<
typename T>
3120 std::string
str()
const;
3218 template <
class Stat>
3340 return Temp(std::make_shared<
BinaryNode<std::multiplies<Result> > >(
l,
r));
3352 return Temp(std::make_shared<
UnaryNode<std::negate<Result> > >(
l));
3355 template <
typename T>
3362 template <
typename T>
3372 return Temp(std::make_shared<
SumNode<std::plus<Result> > >(
val));
3427 #endif // __BASE_STATISTICS_HH__
Tick last
The tick that current last changed.
AvgStor(Info *info)
Build and initializes this stat storage.
ScalarProxy(Stat &s, off_type i)
Create and initialize this proxy, do not register it with the database.
const Storage * data() const
Retrieve a const pointer to the storage.
V(T::* MethodPointer)() const
void operator++()
Increment the stat by 1.
ValueBase(Group *parent, const char *name, const char *desc)
Temp(unsigned short value)
Create a ConstNode.
Derived & scalar(T &value)
const VResult & result() const
Return the result vector of this subtree.
Derived & method(T *obj, V(T::*method)() const)
Extended functor that calls the specified method of the provided object.
SampleStor(Info *info)
Create and initialize this storage.
void reset(Info *info)
Reset stat value to default.
void dec(Counter val)
Deccrement the current count by the provided value, calls set.
Result total() const
Return the total of the result vector.
Result total() const
Return the total of the result vector.
Proxy operator[](off_type index)
void operator++(int)
Increment the stat by 1.
void processResetQueue()
Process all the callbacks in the reset callbacks queue.
bool zero() const
Return true if no samples have been added.
char storage[sizeof(Storage)] __attribute__((aligned(8)))
The storage for this stat.
const VectorProxy & operator=(const VectorProxy &sp)
void prepare(Info *info)
Prepare stat data for dumping or serialization.
Temp operator+(Temp l, Temp r)
Data structure of sparse histogram.
The parameters for a distribution stat.
Counter min
The minimum value to track.
void operator=(const U &v)
Set the data value to the given value.
Templatized storage and interface to a per-tick average stat.
VCounter cvec
Counter for each bucket.
Result total() const override
Return the total of the result vector.
SparseHistogram(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
const Stat::Storage * data() const
InfoProxyType< Derived > Info
Tick lastReset
The tick of the last reset.
Result total() const
Return the total of the result vector.
Histogram(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
Templatized storage and interface for a histogram stat.
DistProxy(Stat &s, off_type i)
NodePtr getNodePtr() const
Makde gcc < 4.6.3 happy and explicitly get the underlying node.
size_type buckets
The number of buckets.
Temp(unsigned int value)
Create a ConstNode.
ScalarInfoProxy(Stat &stat)
Result result() const
Return the current average.
size_type size() const
Return the number of elements, always 1 for a scalar.
DataWrapVec(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
VectorAverageDeviation & init(size_type size)
Initialize storage for this distribution.
size_type size() const
Return the number of buckets in this distribution.
void reset(Info *info)
Reset stat value to default.
Implementation of a vector of stats.
Temp(double value)
Create a ConstNode.
const Storage * data() const
Retrieve a const pointer to the storage.
size_type size() const
Return the number of nodes in the subtree starting at this node.
void prepare()
Prepare the stat for dumping.
std::map< std::string, Info * > NameMapType
Implementation of a scalar stat.
void registerDumpCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are about to be dumped.
Counter min_val
The smallest value sampled.
size_type size() const
Return the number of entries in this stat, 1.
DistProxy< Derived > Proxy
Value(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
const std::string to_string(sc_enc enc)
The parameters for a distribution stat.
Temp(float value)
Create a ConstNode.
Counter max_bucket
The maximum value to track.
size_type size() const override
Return the number of nodes in the subtree starting at this node.
const ScalarProxy & operator=(const ScalarProxy &sp)
Set this proxy equal to the provided one.
DataWrap(Group *parent, const char *name, const char *desc)
Derived & ysubname(off_type index, const std::string &subname)
Derived & functor(const T &func)
uint64_t Tick
Tick count type.
Temp(const NodePtr &n)
Copy the given pointer to this class.
std::function< Result()> functor
size_type size() const
Return the number of elements, always 1 for a scalar.
size_type size() const
Return the number of entries in this stat.
void visit(Output &visitor)
Visitor entry for outputing statistics data.
size_type size() const
Return the number of entries in this stat.
Implementation of a sparse histogram stat.
VCounter cvec
Local storage for the entry values, used for printing.
Storage * data()
Retrieve the storage.
void prepare(Info *info, DistData &data)
const VResult & result() const
Result total() const
Return the total of the result vector.
A proxy class to access the stat at a given index in a VectorBase stat.
void operator-=(const U &v)
Decrement the stat by the given value.
Counter samples
The number of samples.
std::vector< std::string > y_subnames
AvgSampleStor(Info *info)
Create and initialize this storage.
Proxy operator[](off_type index)
Return a reference (ScalarProxy) to the stat at the given index.
void visit(Output &visitor)
Storage * data(off_type index)
Retrieve the storage.
Counter samples
Counter for number of samples.
Temp(signed char value)
Create a ConstNode.
Calculates the per tick mean and variance of the samples.
std::string str() const override
VectorDistInfoProxy< Derived > Info
Temp(signed long long value)
Create a ConstNode.
std::map< Counter, int > MCounter
map of counters
const VResult & result() const
Return the result vector of this subtree.
Counter max
The maximum value to track.
Counter value() const
Return the current count.
Counter min_track
The minimum value to track.
Counter sum
Current total.
const FlagsType display
Print this stat.
const Storage * data(off_type index) const
Retrieve a const pointer to the storage.
Counter squares
The sum of squares.
Base class for formula statistic node.
A vector of scalar stats.
VectorProxy(const VectorProxy &sp)
Result result() const
Return the current value of this statas a result type.
This is a vector of AverageDeviation stats.
A vector of distributions.
virtual Result result() const =0
Proxy operator[](off_type index)
Counter logs
The sum of logarithm of each sample, used to compute geometric mean.
Templatized storage and interface for a distribution stat.
Storage * storage
The storage of this stat.
void prepare(Info *info, DistData &data)
VectorStatNode(const VectorInfo *d)
Counter value() const
Return the current value of this stat as its base type.
Temp(const Scalar &s)
Create a new ScalarStatNode.
void operator++(int)
Increment the stat by 1.
NodePtr node
Pointer to a Node object.
Counter min_bucket
The minimum value to track.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
virtual Result total() const =0
Return the total of the result vector.
const StorageParams * storageParams
Counter squares
The sum of squares.
Result total() const
Return the total of the result vector.
Derived & ysubnames(const char **names)
virtual Result total() const =0
DistBase(Group *parent, const char *name, const char *desc)
void reset(Info *info)
Reset stat value to default.
Counter bucket_size
The number of entries in each bucket.
size_type size() const
Return the number of nodes in the subtree starting at this node.
This is a simple scalar statistic, like a counter.
StatStor(Info *info)
Builds this storage element and calls the base constructor of the datatype.
StandardDeviation(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
Construct and initialize this distribution.
Counter samples
The number of samples.
ScalarProxy< Stat > operator[](off_type index)
const Stat::Storage * data(off_type index) const
The parameters for a distribution stat.
virtual Counter value() const =0
Helper class to construct formula node trees.
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
MCounter cmap
Counter for each bucket.
virtual const VResult & result() const =0
Return the result vector of this subtree.
Counter squares
The sum of squares.
Storage * data()
Retrieve the storage.
Counter value() const
Return the current value of this stat as its base type.
bool validateStatName(const string &name)
Temp(const AverageVector &s)
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
VectorDistInfoProxy(Stat &stat)
void setInfo(Group *parent, Info *info)
Set up an info class for this statistic.
char storage[sizeof(Storage)] __attribute__((aligned(8)))
The storage of this stat.
ScalarStatNode(const ScalarInfo *d)
Temp(const ScalarProxy< Stat > &p)
Create a new ScalarProxyNode.
void(* Handler)()
Register reset and dump handlers.
const Info * resolve(const std::string &name)
void prepare(Info *info, DistData &data)
FunctorProxy(const T &func)
Stat & stat
Pointer to the parent Vector.
bool zero() const
Returns true if any calls to sample have been made.
void registerResetCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are reset.
void operator--(int)
Decrement the stat by 1.
void reset()
Reset the stat to the default state.
virtual Result total() const =0
const std::string & setSeparator() const
VectorAverageDeviation(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
Storage * data(off_type index)
Counter max_track
The maximum value to track.
DataWrap & operator=(const DataWrap &)=delete
Temp(signed long value)
Create a ConstNode.
Counter squares
Current sum of squares.
bool zero() const
Return true if no samples have been added.
ConstVectorNode(const T &s)
Counter sum
The current sum.
Templatized storage and interface for a sparse histogram stat.
void reset()
Reset the stat to the default state.
Temp operator-(Temp l, Temp r)
const VResult & result() const
Return the result vector of this subtree.
bool check() const
Check that this stat has been set up properly and is ready for use.
virtual const VResult & result() const =0
SparseHistBase(Group *parent, const char *name, const char *desc)
void reset(Info *info)
Reset stat value to default.
const VResult & result() const override
Return the result vector of this subtree.
virtual std::string str() const =0
ScalarBase(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
VectorProxy(Stat &s, off_type o, size_type l)
InfoProxyType< Derived > Info
Derived & subdesc(off_type index, const std::string &desc)
Set the subfield description for the given index and marks this stat to print at the end of simulatio...
Vector2dInfoProxy< Derived > Info
Vector2d(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
void result(VResult &vec) const
Copy the values to a local vector and return a reference to it.
VCounter cvec
Counter for each bucket.
SparseHistInfoProxy< Derived > Info
The parameters for a sparse histogram stat.
void operator++()
Increment the stat by 1.
Calculates the mean and variance of all the samples.
A proxy similar to the FunctorProxy, but allows calling a method of a bound object,...
Info * info()
Grab the information class for this statistic.
Templatized storage for distribution that calculates per tick mean and variance.
Temp(const Vector &s)
Create a new VectorStatNode.
BinaryNode(NodePtr &a, NodePtr &b)
Derived & setSeparator(const std::string &_sep)
Set the character(s) used between the name and vector number on vectors, dist, etc.
list< Info * > & statsList()
Counter current
The current count.
size_type size() const
Return the number of entries, in this case 1.
Storage * data()
Retrieve the storage.
Templatized storage and interface for a distribution that calculates mean and variance.
VectorProxy< Derived > Proxy
VectorStandardDeviation & init(size_type size)
Initialize storage for this distribution.
Counter max_val
The largest value sampled.
virtual size_type size() const =0
std::vector< DistData > data
A simple distribution stat.
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Temp constantVector(T val)
const std::string & name()
Derived & init(size_type size)
Set this vector to have the given size.
DistInfoProxy(Stat &stat)
void dec(Counter val)
Decrement the stat by the given value.
const VResult & result() const
Return the result vector of this subtree.
const Storage * data() const
Retrieve a const pointer to the storage.
std::string ysubname(off_type i) const
void reset(Info *info)
Reset stat value to default.
SparseHistStor(Info *info)
const Info * info() const
virtual size_type size() const =0
Return the number of nodes in the subtree starting at this node.
void operator+=(const U &v)
Increment the stat by the given value.
Counter bucket_size
The number of entries in each bucket.
Implementation of a distribution stat.
double Result
All results are doubles.
void operator+=(const U &v)
Increment the stat by the given value.
virtual void visit(const ScalarInfo &info)=0
VectorStandardDeviation(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
Counter underflow
The number of values sampled less than min.
void inc(Counter val)
Increment the stat by the given value.
Temp operator/(Temp l, Temp r)
Result total
The total count for all tick.
A stat that calculates the per tick average of a value.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
double Counter
All counters are of 64-bit values.
Temp(unsigned long value)
Create a ConstNode.
size_type size() const
Return the number of nodes in the subtree starting at this node.
void operator--()
Decrement the stat by 1.
ScalarProxy< Derived > Proxy
Proxy type.
bool zero() const
Returns true if any calls to sample have been made.
Templatized storage and interface for a simple scalar stat.
void reset()
Reset stat value to default.
void inc(Counter val)
Increment the current count by the provided value, calls set.
Counter data
The statistic value.
SparseHistInfoProxy(Stat &stat)
void setInit()
Save Storage class parameters if any.
Derived & functor(T &func)
void sample(const U &v, int n=1)
const VResult & result() const
Result result() const
Return the value of this stat as a result type.
const Storage * data(off_type index) const
void processDumpQueue()
Process all the callbacks in the dump callbacks queue.
void operator--()
Decrement the stat by 1.
A 2-Dimensional vecto of scalar stats.
Temp operator*(Temp l, Temp r)
void setName(const std::string &name)
Set the name of this statistic.
Temp(const Value &s)
Create a new ScalarStatNode.
const VResult & result() const
Return the result vector of this subtree.
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
const Storage * data(off_type index) const
void operator=(const U &v)
Set the data value to the given value.
bool zero() const
Returns true if any calls to sample have been made.
Overload hash function for BasicBlockRange type.
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
void prepare(Info *info)
Prepare stat data for dumping or serialization.
void dump()
Dump all statistics data to the registered outputs.
Counter sum
The current sum.
A vector of Average stats.
void operator--(int)
Decrement the stat by 1.
void reset()
Reset stat value to default.
Result total() const
Return the total of the result vector.
std::string name
The name of the stat.
char storage[sizeof(Storage)]
The storage for this stat.
void add(DistBase &d)
Add the argument distribution to the this distribution.
Counter sum
The current sum.
Temp(signed int value)
Create a ConstNode.
Temp(signed short value)
Create a ConstNode.
DistData data
Local storage for the entry values, used for printing.
VectorDistribution & init(size_type size, Counter min, Counter max, Counter bkt)
Initialize storage and parameters for this distribution.
const DistProxy & operator=(const DistProxy &sp)
Derived & init(size_type _x, size_type _y)
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
void set(Counter val)
The the stat to the given value.
void reset()
Proxy has no state.
VectorDistBase(Group *parent, const char *name, const char *desc)
const std::string & name() const
SparseHistData data
Local storage for the entry values, used for printing.
DataWrapVec2d(Group *parent, const char *name, const char *desc)
size_type size() const
Return the number of nodes in the subtree starting at this node.
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
bool zero() const
Return true if no samples have been added.
AverageVector(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
void setParams(const StorageParams *params)
Save Storage class parameters if any.
DistInfoProxy< Derived > Info
Result total() const
Return a total of all entries in this vector.
void addStat(Stats::Info *info)
Register a stat with this group.
ScalarProxyNode(const ScalarProxy< Stat > &p)
size_type size() const
Return the number of nodes in the subtree starting at this node.
Vector(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
VectorBase(Group *parent, const char *name, const char *desc)
const VResult & result() const
Return the result vector of this subtree.
Histogram & init(size_type size)
Set the parameters of this histogram.
size_type size() const
Return the number of buckets in this distribution.
const ScalarProxy< Stat > proxy
Scalar(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
std::map< const void *, Info * > MapType
Counter value() const
Return the value of this stat as its base type.
size_type size() const
Return the number of nodes in the subtree starting at this node.
MethodProxy(T *obj, MethodPointer meth)
void operator-=(const U &v)
Decrement the stat by the given value.
Vector2dInfoProxy(Stat &stat)
void registerHandlers(Handler reset_handler, Handler dump_handler)
void prepare(Info *info, DistData &data)
void reset()
Reset stat value to default.
ScalarProxy(const ScalarProxy &sp)
Create a copy of the provided ScalarProxy.
void value(VCounter &vec) const
Average(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
size_type size() const
Return the number of buckets in this distribution.
Distribution(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
AverageDeviation(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
Construct and initialize this distribution.
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
void prepare(Info *info, SparseHistData &data)
DistProxy(const DistProxy &sp)
VectorInfoProxy(Stat &stat)
Stat::Storage * data(off_type index)
VectorDistribution(Group *parent=nullptr, const char *name=nullptr, const char *desc=nullptr)
This is a vector of StandardDeviation stats.
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
void reset(Info *info)
Reset stat value to default.
Temp(unsigned char value)
Create a ConstNode.
void set(Counter val)
Set the current count to the one provided, update the total and last set values.
std::string csprintf(const char *format, const Args &...args)
Temp(const Average &s)
Create a new ScalarStatNode.
void reset(Info *info)
Reset stat value to default.
off_type index
The index to access in the parent VectorBase.
void sample(Counter val, int number)
Add a value the given number of times to this running average.
Result total() const
Return a total of all entries in this vector.
Temp(unsigned long long value)
Create a ConstNode.
size_type size() const
Return the number of nodes in the subtree starting at this node.
Counter bucket_size
The number of entries in each bucket.
const VResult & result() const
Return the result vector of this subtree.
bool zero() const
Return true if no samples have been added.
std::shared_ptr< Node > NodePtr
Shared pointer to a function Node.
Vector2dBase(Group *parent, const char *name, const char *desc)
InfoProxyType< Derived > Info
size_type buckets
The number of buckets.
bool check() const
Check that this stat has been set up properly and is ready for use.
Counter samples
The number of samples.
Counter overflow
The number of values sampled more than max.
Tick curTick()
The current simulated tick.
Storage * data(off_type index)
Result total() const
Return the total of the result vector.
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17