Type to measure execution time of a scope.
More...
#include <userver/tracing/scope_time.hpp>
Type to measure execution time of a scope.
Use tracing::Span::CreateScopeTime() to construct
Definition at line 25 of file scope_time.hpp.
◆ Duration
using tracing::ScopeTime::Duration = std::chrono::nanoseconds |
◆ DurationMillis
using tracing::ScopeTime::DurationMillis = std::chrono::duration<double, std::milli> |
◆ ScopeTime() [1/2]
tracing::ScopeTime::ScopeTime |
( |
| ) |
|
◆ ScopeTime() [2/2]
tracing::ScopeTime::ScopeTime |
( |
std::string |
scope_name | ) |
|
|
explicit |
◆ CurrentScope()
const std::string & tracing::ScopeTime::CurrentScope |
( |
| ) |
const |
|
inline |
◆ DurationSinceReset()
Duration tracing::ScopeTime::DurationSinceReset |
( |
| ) |
const |
Returns time elapsed since last reset Will return 0 if the timer is stopped
◆ DurationTotal() [1/2]
Duration tracing::ScopeTime::DurationTotal |
( |
| ) |
const |
Returns total time elapsed for current scope Will return 0 if the timer is stopped
◆ DurationTotal() [2/2]
Duration tracing::ScopeTime::DurationTotal |
( |
const std::string & |
scope_name | ) |
const |
Returns total time elapsed for a certain scope. If there is no record for the scope, returns 0
◆ ElapsedSinceReset()
DurationMillis tracing::ScopeTime::ElapsedSinceReset |
( |
| ) |
const |
◆ ElapsedTotal() [1/2]
DurationMillis tracing::ScopeTime::ElapsedTotal |
( |
| ) |
const |
◆ ElapsedTotal() [2/2]
DurationMillis tracing::ScopeTime::ElapsedTotal |
( |
const std::string & |
scope_name | ) |
const |
Returns total time elapsed for a certain scope. If there is no record for the scope, returns 0.
Prefer using ScopeTime::DurationTotal()
The documentation for this class was generated from the following file: