OmniSketch  0.1
Oh my sketch!
OmniSketch::Test::MetricVec Class Reference

Metric vector. More...

#include <test.h>

Public Member Functions

 MetricVec (const std::string_view file_path, const std::string_view test_path, const std::string_view term_name)
 Read and parse the metric vector. More...
 
bool in (const Metric metric) const
 Whether a metric is specified. More...
 

Public Attributes

std::set< Metricmetric_set
 set of interested metrics More...
 
double podf
 threshold for podf More...
 
std::vector< double > quantiles
 quantiles of distribution More...
 

Detailed Description

Metric vector.

Holding metrics that are of interest. Manipulated by TestBase.

Constructor & Destructor Documentation

◆ MetricVec()

OmniSketch::Test::MetricVec::MetricVec ( const std::string_view  file_path,
const std::string_view  test_path,
const std::string_view  term_name 
)

Read and parse the metric vector.

Parameters
file_pathPath to the config file
test_pathPath to the node containing testing routines in the file (concatenated with '.', see example below)
term_nameName of the testing routine in TOML file
Note
Once Metric::PODF is declared in the current testing routine, say
XXX = [..., "PODF", ...]

you have to add to the same node a line

XXX_podf = [a threshold]

to specify the error threshold in order for MetricVec to read. Likewise, with Metric::DIST you have to add a line

XXX_dist = [a vector of double]

to specify the ticks.

Example

Suppose we have the following toml file:

# toml.toml
[MySketch.test]
insert = ["RATE"]

The proper way of creating an MetricVec is ("toml.toml", "MySketch.test", "insert").

Member Function Documentation

◆ in()

bool OmniSketch::Test::MetricVec::in ( const Metric  metric) const
inline

Whether a metric is specified.

Member Data Documentation

◆ metric_set

std::set<Metric> OmniSketch::Test::MetricVec::metric_set

set of interested metrics

◆ podf

double OmniSketch::Test::MetricVec::podf

threshold for podf

◆ quantiles

std::vector<double> OmniSketch::Test::MetricVec::quantiles

quantiles of distribution