unity.scopes.testing.Benchmark

The Benchmark class defines an interface to provide scope authors with runtime benchmarking capabilities to be used in their own testing. More...

#include <unity/scopes/testing/Benchmark.h>

Inheritance diagram for unity::scopes::testing::Benchmark: src="https://assets.ubuntu.com/v1/92931db8-classunity_1_1scopes_1_1testing_1_1_benchmark__inherit__graph.png" border="0" alt="Inheritance graph"/>

Classes

struct  ActionConfiguration
 The ActionConfiguration struct constains all options controlling the benchmark of scope action activation operations. More...
 
struct  ActivationConfiguration
 The ActivationConfiguration struct constains all options controlling the benchmark of scope activation operations. More...
 
struct  PreviewConfiguration
 The PreviewConfiguration struct constains all options controlling the benchmark of scope preview operations. More...
 
struct  QueryConfiguration
 The QueryConfiguration struct constains all options controlling the benchmark of scope query operations. More...
 
struct  Result
 The Result struct encapsulates all of the result gathered from one individual benchmark run consisting of multiple independent trials. More...
 
struct  StatisticsConfiguration
 The StatisticsConfiguration struct contains options controlling the calculation of benchmark result statistics. More...
 
struct  TrialConfiguration
 The TrialConfiguration struct contains options controlling the execution of individual trials. More...
 

Public Member Functions

virtual Result for_query (const std::shared_ptr< unity::scopes::ScopeBase > &scope, QueryConfiguration configuration)=0
 for_query executes a benchmark to measure the scope's query performance. More...
 
virtual Result for_preview (const std::shared_ptr< unity::scopes::ScopeBase > &scope, PreviewConfiguration configuration)=0
 for_preview executes a benchmark to measure the scope's preview performance. More...
 
virtual Result for_activation (const std::shared_ptr< unity::scopes::ScopeBase > &scope, ActivationConfiguration configuration)=0
 for_preview executes a benchmark to measure the scope's activation performance. More...
 
virtual Result for_action (const std::shared_ptr< unity::scopes::ScopeBase > &scope, ActionConfiguration configuration)=0
 for_preview executes a benchmark to measure the scope's action activation performance. More...
 

Detailed Description

The Benchmark class defines an interface to provide scope authors with runtime benchmarking capabilities to be used in their own testing.

Member Function Documentation

virtual Result unity::scopes::testing::Benchmark::for_action ( const std::shared_ptr< unity::scopes::ScopeBase > &  scope,
ActionConfiguration  configuration 
)
pure virtual

for_preview executes a benchmark to measure the scope's action activation performance.

Exceptions
std::runtime_errorin case of timeouts.
std::logic_errorin case of misconfiguration.
Parameters
scopeThe scope instance to benchmark.
configurationOptions controlling the experiment.
Returns
An instance of Result.

Implemented in unity::scopes::testing::OutOfProcessBenchmark, and unity::scopes::testing::InProcessBenchmark.

virtual Result unity::scopes::testing::Benchmark::for_activation ( const std::shared_ptr< unity::scopes::ScopeBase > &  scope,
ActivationConfiguration  configuration 
)
pure virtual

for_preview executes a benchmark to measure the scope's activation performance.

Exceptions
std::runtime_errorin case of timeouts.
std::logic_errorin case of misconfiguration.
Parameters
scopeThe scope instance to benchmark.
configurationOptions controlling the experiment.
Returns
An instance of Result.

Implemented in unity::scopes::testing::OutOfProcessBenchmark, and unity::scopes::testing::InProcessBenchmark.

virtual Result unity::scopes::testing::Benchmark::for_preview ( const std::shared_ptr< unity::scopes::ScopeBase > &  scope,
PreviewConfiguration  configuration 
)
pure virtual

for_preview executes a benchmark to measure the scope's preview performance.

Exceptions
std::runtime_errorin case of timeouts.
std::logic_errorin case of misconfiguration.
Parameters
scopeThe scope instance to benchmark.
configurationOptions controlling the experiment.
Returns
An instance of Result.

Implemented in unity::scopes::testing::OutOfProcessBenchmark, and unity::scopes::testing::InProcessBenchmark.

virtual Result unity::scopes::testing::Benchmark::for_query ( const std::shared_ptr< unity::scopes::ScopeBase > &  scope,
QueryConfiguration  configuration 
)
pure virtual

for_query executes a benchmark to measure the scope's query performance.

Exceptions
std::runtime_errorin case of timeouts.
std::logic_errorin case of misconfiguration.
Parameters
scopeThe scope instance to benchmark.
configurationOptions controlling the experiment.
Returns
An instance of Result.

Implemented in unity::scopes::testing::OutOfProcessBenchmark, and unity::scopes::testing::InProcessBenchmark.