Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InProcessBenchmark.h
1 /*
2  * Copyright (C) 2013 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 
19 #ifndef UNITY_SCOPES_TESTING_IN_PROCESS_BENCHMARK_H
20 #define UNITY_SCOPES_TESTING_IN_PROCESS_BENCHMARK_H
21 
22 #include <unity/scopes/testing/Benchmark.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 class ScopeBase;
30 
31 namespace testing
32 {
56 {
57 public:
58  InProcessBenchmark() = default;
59 
60  virtual Result for_query(const std::shared_ptr<unity::scopes::ScopeBase>& scope,
61  QueryConfiguration configuration) override;
62 
63  virtual Result for_preview(const std::shared_ptr<unity::scopes::ScopeBase>& scope,
64  PreviewConfiguration preview_configuration) override;
65 
66  virtual Result for_activation(const std::shared_ptr<unity::scopes::ScopeBase>& scope,
67  ActivationConfiguration activation_configuration) override;
68 
69  virtual Result for_action(const std::shared_ptr<unity::scopes::ScopeBase>& scope,
70  ActionConfiguration activation_configuration) override;
71 };
72 
73 } // namespace testing
74 
75 } // namespace scopes
76 
77 } // namespace unity
78 
79 #endif
The ActionConfiguration struct constains all options controlling the benchmark of scope action activa...
Definition: Benchmark.h:270
The InProcessBenchmark class provides scope authors with runtime benchmarking capabilities. The actual runs are executed in the same process.
Definition: InProcessBenchmark.h:55
The PreviewConfiguration struct constains all options controlling the benchmark of scope preview oper...
Definition: Benchmark.h:225
The ActivationConfiguration struct constains all options controlling the benchmark of scope activatio...
Definition: Benchmark.h:248
virtual Result for_query(const std::shared_ptr< unity::scopes::ScopeBase > &scope, QueryConfiguration configuration) override
for_query executes a benchmark to measure the scope's query performance.
virtual Result for_preview(const std::shared_ptr< unity::scopes::ScopeBase > &scope, PreviewConfiguration preview_configuration) override
for_preview executes a benchmark to measure the scope's preview performance.
virtual Result for_activation(const std::shared_ptr< unity::scopes::ScopeBase > &scope, ActivationConfiguration activation_configuration) override
for_preview executes a benchmark to measure the scope's activation performance.
The Result struct encapsulates all of the result gathered from one individual benchmark run consistin...
Definition: Benchmark.h:55
virtual Result for_action(const std::shared_ptr< unity::scopes::ScopeBase > &scope, ActionConfiguration activation_configuration) override
for_preview executes a benchmark to measure the scope's action activation performance.
The QueryConfiguration struct constains all options controlling the benchmark of scope query operatio...
Definition: Benchmark.h:203
The Benchmark class defines an interface to provide scope authors with runtime benchmarking capabilit...
Definition: Benchmark.h:48