HEBench
|
Base class for objects representing a specific benchmark based on an HEBench benchmark descriptor. More...
#include <benchmark.hpp>
Public Member Functions | |
BenchmarkDescription ()=default | |
virtual | ~BenchmarkDescription ()=default |
void | getBenchmarkDescriptor (hebench::APIBridge::BenchmarkDescriptor &bench_desc) const |
Retrieves the HEBench benchmark descriptor represented by this BenchmarkDescription object. More... | |
const hebench::APIBridge::BenchmarkDescriptor & | getBenchmarkDescriptor () const |
Retrieves the HEBench benchmark descriptor represented by this BenchmarkDescription object. More... | |
const std::vector< std::vector< hebench::APIBridge::WorkloadParam > > & | getWorkloadDefaultParameters () const |
Retrieves the sets of default arguments supported by this benchmark's workload. More... | |
virtual std::string | getBenchmarkDescription (const hebench::APIBridge::WorkloadParams *p_w_params) const |
Retrieves human-readable description specific to the represented benchmark. More... | |
std::size_t | getWorkloadParameterCount () const |
Retrieves the number of flexible parameters for this benchmark's workload. More... | |
virtual BaseBenchmark * | createBenchmark (BaseEngine &engine, const hebench::APIBridge::WorkloadParams *p_params)=0 |
Instantiates the represented benchmark. More... | |
virtual void | destroyBenchmark (BaseBenchmark *p_bench)=0 |
Destroys and frees resources held by a BaseBenchmark (or derived) object previously created by createBenchmark(). More... | |
std::int64_t | classTag () const override |
Retrieves the tag of the class to which this object belongs. More... | |
Public Member Functions inherited from hebench::cpp::ITaggedObject | |
ITaggedObject () | |
virtual | ~ITaggedObject () |
Static Public Attributes | |
static constexpr std::int64_t | tag = 0x1000000000000000 |
Used to identify this class when returned as a handle to Test Harness. More... | |
Static Public Attributes inherited from hebench::cpp::ITaggedObject | |
static constexpr std::int64_t | MaskByteSet = 0xFF |
static constexpr std::int64_t | MaskReservedBits = MaskByteSet << 56 |
Mask representing all bits reserved by C++ wrapper. More... | |
Protected Member Functions | |
void | addDefaultParameters (const WorkloadParams::Common &default_params_set) |
Adds a new set of default arguments for the parameters for this benchmark's workload. More... | |
void | addDefaultParameters (const std::vector< hebench::APIBridge::WorkloadParam > &default_params_set) |
Adds a new set of default arguments for the parameters for this benchmark's workload. More... | |
Protected Attributes | |
hebench::APIBridge::BenchmarkDescriptor | m_descriptor |
HEBench descriptor for this benchmark. More... | |
Base class for objects representing a specific benchmark based on an HEBench benchmark descriptor.
An HEBench benchmark descriptor describes a unique benchmark and specifies default workload parameters supported.
This class wraps the functionality to describe, instantiate and destroy the appropriate benchmark class. A BaseEngine (or derived class) uses this behavior to create the appropriate benchmark object that can execute the workload requested by Test Harness.
Definition at line 35 of file benchmark.hpp.
|
default |
|
virtualdefault |
|
protected |
Adds a new set of default arguments for the parameters for this benchmark's workload.
[in] | default_params_set | The new set of default values for the parameters of this workload. |
std::invalid_argument | if size of default_params_set is invalid. See details. |
If this is not the first set added, the size of default_params_set
must be the same as any other existing default parameter sets.
Definition at line 38 of file benchmark.cpp.
|
protected |
Adds a new set of default arguments for the parameters for this benchmark's workload.
[in] | default_params_set | The new set of default values for the parameters of this workload. |
std::invalid_argument | if size of default_params_set is invalid. See details. |
If this is not the first set added, default_params_set
must represent a set with the same amount of parameters as any other existing default parameter sets.
Definition at line 33 of file benchmark.cpp.
|
inlineoverridevirtual |
Retrieves the tag of the class to which this object belongs.
Most significant 8 bits of the 64-bit tag are reserved by C++ wrapper. See ITaggedObject
for more details.
Implements hebench::cpp::ITaggedObject.
Definition at line 102 of file benchmark.hpp.
|
pure virtual |
Instantiates the represented benchmark.
engine | Engine creating the benchmark. | |
[in] | p_params | Arguments to the workload parameters to use for this benchmark. It is ignored if workload does not support parameters. |
|
pure virtual |
Destroys and frees resources held by a BaseBenchmark (or derived) object previously created by createBenchmark().
[in] | p_bench | Pointer to benchmark object to destroy. |
|
virtual |
Retrieves human-readable description specific to the represented benchmark.
hebench::APIBridge::getBenchmarkDescriptionEx()
.Default implementation returns an empty string. Derived classes should override this method and return appropriate description. The description will be inserted in a CSV formatted output, so, derived classes can take advantage of this knowledge to format the description as appropriate.
Definition at line 17 of file benchmark.cpp.
|
inline |
Retrieves the HEBench benchmark descriptor represented by this BenchmarkDescription object.
Definition at line 58 of file benchmark.hpp.
void hebench::cpp::BenchmarkDescription::getBenchmarkDescriptor | ( | hebench::APIBridge::BenchmarkDescriptor & | bench_desc | ) | const |
Retrieves the HEBench benchmark descriptor represented by this BenchmarkDescription object.
[out] | bench_desc | Reference where to store the benchmark descriptor. |
Definition at line 28 of file benchmark.cpp.
|
inline |
Retrieves the sets of default arguments supported by this benchmark's workload.
Definition at line 64 of file benchmark.hpp.
std::size_t hebench::cpp::BenchmarkDescription::getWorkloadParameterCount | ( | ) | const |
Retrieves the number of flexible parameters for this benchmark's workload.
This is computed based on default parameters added to the description using addDefaultParameters().
Definition at line 23 of file benchmark.cpp.
|
protected |
HEBench descriptor for this benchmark.
This member is to be initialized during derived class construction to reflect the appropriate benchmark description.
Definition at line 110 of file benchmark.hpp.
|
staticconstexpr |
Used to identify this class when returned as a handle to Test Harness.
Definition at line 42 of file benchmark.hpp.