13 const std::string PhaseScope::EMPTY_NAME(
"<none>");
14 const PhaseMetrics PhaseScope::EMPTY_METRICS;
27 return _phase ? _phase->StartPhase(phase) :
nullptr;
32 return _phase ? _phase->StartPhaseThreadSafe(phase) :
nullptr;
46 return _phase ? _phase->ScopePhase(phase) :
nullptr;
51 return _phase ? _phase->ScopePhaseThreadSafe(phase) :
nullptr;
std::shared_ptr< PhaseScope > ScopePhaseThreadSafe(const std::string &phase) override
Start a new sub-phase with a given name in a multi-thread environment and wrap it in a PhaseScope.
std::shared_ptr< Phase > StartPhaseThreadSafe(const std::string &phase) override
Start a new sub-phase with a given name in a multi-thread environment.
std::shared_ptr< Phase > StartPhase(const std::string &phase) override
Start a new sub-phase with a given name in a single-thread environment.
void StopPhase() override
Stop measurement of the current phase.
virtual ~PhaseScope()
Benchmark phase will be stopped on destructing.
std::shared_ptr< PhaseScope > ScopePhase(const std::string &phase) override
Start a new sub-phase with a given name in a single-thread environment and wrap it in a PhaseScope.
C++ Benchmark project definitions.
Benchmark phase scope definition.