Benchmark phase core.  
 More...
#include <phase_core.h>
Benchmark phase core. 
Implementation of the Phase interface. 
Definition at line 26 of file phase_core.h.
◆ PhaseCore() [1/3]
  
  | 
        
          | CppBenchmark::PhaseCore::PhaseCore | ( | const std::string & | name | ) |  |  | inlineexplicit | 
 
Create a new benchmark phase core with a given name. 
- Parameters
- 
  
  
Definition at line 40 of file phase_core.h.
 
 
◆ PhaseCore() [2/3]
  
  | 
        
          | CppBenchmark::PhaseCore::PhaseCore | ( | const PhaseCore & |  | ) |  |  | delete | 
 
 
◆ PhaseCore() [3/3]
  
  | 
        
          | CppBenchmark::PhaseCore::PhaseCore | ( | PhaseCore && |  | ) |  |  | delete | 
 
 
◆ ~PhaseCore()
  
  | 
        
          | virtual CppBenchmark::PhaseCore::~PhaseCore | ( |  | ) |  |  | virtualdefault | 
 
 
◆ current()
Current benchmark phase metrics. 
Definition at line 50 of file phase_core.h.
 
 
◆ InitLatencyHistogram()
  
  | 
        
          | void CppBenchmark::PhaseCore::InitLatencyHistogram | ( | const std::tuple< int64_t, int64_t, int > & | latency | ) |  |  | inlineprotectednoexcept | 
 
Initialize latency histogram for the current phase. 
- Parameters
- 
  
    | latency | - Latency histogram parameters |  
 
Definition at line 81 of file phase_core.h.
 
 
◆ MergeMetrics() [1/2]
  
  | 
        
          | void CppBenchmark::PhaseCore::MergeMetrics | ( |  | ) |  |  | inlineprotected | 
 
Merge phase metrics (current to result) 
Definition at line 99 of file phase_core.h.
 
 
◆ MergeMetrics() [2/2]
  
  | 
        
          | void CppBenchmark::PhaseCore::MergeMetrics | ( | PhaseCore & | phase | ) |  |  | inlineprotected | 
 
Merge metrics of the two phases. 
Definition at line 102 of file phase_core.h.
 
 
◆ metrics()
  
  | 
        
          | const PhaseMetrics & CppBenchmark::PhaseCore::metrics | ( |  | ) | const |  | inlineoverridevirtualnoexcept | 
 
 
◆ name()
  
  | 
        
          | const std::string & CppBenchmark::PhaseCore::name | ( |  | ) | const |  | inlineoverridevirtualnoexcept | 
 
 
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ PrintLatencyHistogram()
  
  | 
        
          | void CppBenchmark::PhaseCore::PrintLatencyHistogram | ( | FILE * | file, |  
          |  |  | int32_t | resolution |  
          |  | ) |  | const |  | inlineprotectednoexcept | 
 
Print result latency histogram. 
- Parameters
- 
  
    | file | - File to print into |  | resolution | - Histogram resolution |  
 
Definition at line 88 of file phase_core.h.
 
 
◆ ResetMetrics()
  
  | 
        
          | void CppBenchmark::PhaseCore::ResetMetrics | ( |  | ) |  |  | inlineprotectednoexcept | 
 
 
◆ ScopePhase()
  
  | 
        
          | std::shared_ptr< PhaseScope > CppBenchmark::PhaseCore::ScopePhase | ( | const std::string & | phase | ) |  |  | inlineoverridevirtual | 
 
Start a new sub-phase with a given name in a single-thread environment and wrap it in a PhaseScope. 
Please note the method is not thread-safe and should not be called in multi-thread environment!
- Parameters
- 
  
  
- Returns
- Shared pointer to the required benchmark sub-phase scope wrapper 
Implements CppBenchmark::Phase.
Definition at line 58 of file phase_core.h.
 
 
◆ ScopePhaseThreadSafe()
  
  | 
        
          | std::shared_ptr< PhaseScope > CppBenchmark::PhaseCore::ScopePhaseThreadSafe | ( | const std::string & | phase | ) |  |  | inlineoverridevirtual | 
 
Start a new sub-phase with a given name in a multi-thread environment and wrap it in a PhaseScope. 
Please note the method is thread-safe and might be called in multi-thread environment!
- Parameters
- 
  
  
- Returns
- Shared pointer to the required thread-safe benchmark sub-phase scope wrapper 
Implements CppBenchmark::Phase.
Definition at line 60 of file phase_core.h.
 
 
◆ StartCollectingMetrics()
  
  | 
        
          | void CppBenchmark::PhaseCore::StartCollectingMetrics | ( |  | ) |  |  | inlineprotectednoexcept | 
 
Start collecting metrics in the current phase. 
Definition at line 92 of file phase_core.h.
 
 
◆ StartPhase()
  
  | 
        
          | std::shared_ptr< Phase > CppBenchmark::PhaseCore::StartPhase | ( | const std::string & | phase | ) |  |  | overridevirtual | 
 
Start a new sub-phase with a given name in a single-thread environment. 
This method will create or get existent sub-phase with a given name, start benchmark measurement and return it as a shared pointer. Please note the method is not thread-safe and should not be called in multi-thread environment!
- Parameters
- 
  
  
- Returns
- Shared pointer to the required benchmark sub-phase 
Implements CppBenchmark::Phase.
Definition at line 15 of file phase_core.cpp.
 
 
◆ StartPhaseThreadSafe()
  
  | 
        
          | std::shared_ptr< Phase > CppBenchmark::PhaseCore::StartPhaseThreadSafe | ( | const std::string & | phase | ) |  |  | overridevirtual | 
 
Start a new sub-phase with a given name in a multi-thread environment. 
This method will create or get existent sub-phase with a given name, start benchmark measurement and return it as a shared pointer. Please note the method is thread-safe and might be called in multi-thread environment!
- Parameters
- 
  
  
- Returns
- Shared pointer to the thread safe benchmark sub-phase 
Implements CppBenchmark::Phase.
Definition at line 38 of file phase_core.cpp.
 
 
◆ StopCollectingMetrics()
  
  | 
        
          | void CppBenchmark::PhaseCore::StopCollectingMetrics | ( |  | ) |  |  | inlineprotectednoexcept | 
 
Stop collecting metrics in the current phase. 
Definition at line 95 of file phase_core.h.
 
 
◆ StopPhase()
  
  | 
        
          | void CppBenchmark::PhaseCore::StopPhase | ( |  | ) |  |  | inlineoverridevirtual | 
 
 
◆ Benchmark
◆ BenchmarkBase
◆ BenchmarkPC
◆ BenchmarkThreads
◆ Executor
◆ Launcher
◆ _child
  
  | 
        
          | std::vector<std::shared_ptr<PhaseCore> > CppBenchmark::PhaseCore::_child |  | protected | 
 
 
◆ _metrics_current
◆ _metrics_result
◆ _mutex
  
  | 
        
          | std::mutex CppBenchmark::PhaseCore::_mutex |  | protected | 
 
 
◆ _name
  
  | 
        
          | std::string CppBenchmark::PhaseCore::_name |  | protected | 
 
 
◆ _thread
  
  | 
        
          | uint64_t CppBenchmark::PhaseCore::_thread |  | protected | 
 
 
The documentation for this class was generated from the following files: