/** The parameters for a distribution stat. */
struct Params : public DistParams
{
- Params() : DistParams(false) {}
+ Params() : DistParams(Dist) {}
};
private:
* Templatized storage and interface for a distribution that calculates mean
* and variance.
*/
-class FancyStor
+class SampleStor
{
public:
struct Params : public DistParams
{
- Params() : DistParams(true) {}
+ Params() : DistParams(Deviation) {}
};
private:
/**
* Create and initialize this storage.
*/
- FancyStor(Info *info)
+ SampleStor(Info *info)
: sum(Counter()), squares(Counter()), samples(Counter())
{ }
* Templatized storage for distribution that calculates per tick mean and
* variance.
*/
-class AvgFancy
+class AvgSampleStor
{
public:
struct Params : public DistParams
{
- Params() : DistParams(true) {}
+ Params() : DistParams(Deviation) {}
};
private:
/**
* Create and initialize this storage.
*/
- AvgFancy(Info *info)
+ AvgSampleStor(Info *info)
: sum(Counter()), squares(Counter())
{}
/**
* Calculates the mean and variance of all the samples.
- * @sa Stat, DistBase, FancyStor
+ * @sa DistBase, SampleStor
*/
-class StandardDeviation : public DistBase<StandardDeviation, FancyStor>
+class StandardDeviation : public DistBase<StandardDeviation, SampleStor>
{
public:
/**
/**
* Calculates the per tick mean and variance of the samples.
- * @sa Stat, DistBase, AvgFancy
+ * @sa DistBase, AvgSampleStor
*/
-class AverageDeviation : public DistBase<AverageDeviation, AvgFancy>
+class AverageDeviation : public DistBase<AverageDeviation, AvgSampleStor>
{
public:
/**
/**
* A vector of distributions.
- * @sa Stat, VectorDistBase, DistStor
+ * @sa VectorDistBase, DistStor
*/
class VectorDistribution : public VectorDistBase<VectorDistribution, DistStor>
{
/**
* This is a vector of StandardDeviation stats.
- * @sa Stat, VectorDistBase, FancyStor
+ * @sa VectorDistBase, SampleStor
*/
class VectorStandardDeviation
- : public VectorDistBase<VectorStandardDeviation, FancyStor>
+ : public VectorDistBase<VectorStandardDeviation, SampleStor>
{
public:
/**
/**
* This is a vector of AverageDeviation stats.
- * @sa Stat, VectorDistBase, AvgFancy
+ * @sa VectorDistBase, AvgSampleStor
*/
class VectorAverageDeviation
- : public VectorDistBase<VectorAverageDeviation, AvgFancy>
+ : public VectorDistBase<VectorAverageDeviation, AvgSampleStor>
{
public:
/**
const DistParams *params =
safe_cast<const DistParams *>(info.storageParams);
- if (!params->fancy) {
+ if (params->type == Dist) {
stat.size = params->buckets;
stat.min = params->min;
stat.max = params->max;
const DistParams *params =
safe_cast<const DistParams *>(info.storageParams);
- if (!params->fancy) {
+ if (params->type == Dist) {
stat.size = params->buckets;
stat.min = params->min;
stat.max = params->max;
newdata.data = data.samples;
newdata.insert();
- if (data.samples && !params->fancy) {
+ if (data.samples && params->type == Dist) {
newdata.x = db_min_val;
newdata.data = data.min_val;
newdata.insert();