A snapshot of metrics from utils::statistics::Storage.
More...
#include <userver/utils/statistics/testing.hpp>
A snapshot of metrics from utils::statistics::Storage.
Definition at line 31 of file testing.hpp.
◆ Snapshot()
utils::statistics::Snapshot::Snapshot |
( |
const Storage & |
storage, |
|
|
std::string |
prefix = {} , |
|
|
std::vector< Label > |
require_labels = {} |
|
) |
| |
|
explicit |
Create a new snapshot of metrics with paths starting with prefix and labels containing require_labels.
- Exceptions
-
std::exception | if a metric writer throws. |
◆ SingleMetric()
MetricValue utils::statistics::Snapshot::SingleMetric |
( |
std::string |
path, |
|
|
std::vector< Label > |
require_labels = {} |
|
) |
| const |
Find a single metric by the given filter.
- Parameters
-
path | The path of the target metric. prefix specified in the constructor is prepended to the path. |
require_labels | Labels that the target metric should have. |
- Returns
- The value of the single found metric.
- Exceptions
-
The documentation for this class was generated from the following file: