36#ifndef NEKTAR_TESTS_METRICEXECUTIONTIME_H
37#define NEKTAR_TESTS_METRICEXECUTIONTIME_H
95 bool v_Test(std::istream &pStdout, std::istream &pStderr)
override;
96 void v_Generate(std::istream &pStdout, std::istream &pStderr)
override;
Metric that finds the execution time in an output and tests it against an accepted value and toleranc...
std::regex m_regex
Regex used to match an execution time in a test output.
bool v_Test(std::istream &pStdout, std::istream &pStderr) override
Test output against a regular expression and its expected value.
bool m_useStderr
If true, use stderr for testing/generation instead of stdout.
void v_Generate(std::istream &pStdout, std::istream &pStderr) override
Generate an accepted execution time value using a test output or error stream.
static MetricSharedPtr create(TiXmlElement *metric, bool generate)
MetricExecutionTime(TiXmlElement *metric, bool generate)
Construct a new MetricExecutionTime object.
MetricExecutionTimeFieldValue m_match
Stores each execution time found in the test output.
~MetricExecutionTime() override
Base class for all metrics. Metric represents a test metric that can be used to evaluate the function...
std::shared_ptr< Metric > MetricSharedPtr
A shared pointer to an EquationSystem object.
Data structure for an execution time field value.
MetricExecutionTimeFieldValue(std::string value)
double m_tolerance
The tolerance to use for checking the execution time. Defaults to 5.0.
std::string m_value
The value to match. Defaults to empty string.
MetricExecutionTimeFieldValue()
bool m_skip
Indicates whether the metric should be skipped. Defaults to false.