userver: pytest_userver.metrics Namespace Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
pytest_userver.metrics Namespace Reference

Python module that provides helpers for functional testing of metrics with testsuite; see Functional service tests (testsuite) for an introduction. More...

Classes

class  _MetricsJSONEncoder
 
class  Metric
 Metric type that contains the labels: typing.Dict[str, str] and value: int. More...
 
class  MetricsSnapshot
 Snapshot of captured metrics that mimics the dict interface. More...
 

Functions

_FlattenedSnapshot _flatten_snapshot (values, bool ignore_zeros)
 
str _diff_metric_snapshots (_FlattenedSnapshot lhs, _FlattenedSnapshot rhs, bool ignore_zeros)
 

Variables

 _FlattenedSnapshot = typing.Set[typing.Tuple[str, Metric]]
 

Detailed Description

Python module that provides helpers for functional testing of metrics with testsuite; see Functional service tests (testsuite) for an introduction.

Function Documentation

◆ _diff_metric_snapshots()

str pytest_userver.metrics._diff_metric_snapshots ( _FlattenedSnapshot  lhs,
_FlattenedSnapshot  rhs,
bool  ignore_zeros 
)
protected

Definition at line 193 of file metrics.py.

◆ _flatten_snapshot()

_FlattenedSnapshot pytest_userver.metrics._flatten_snapshot (   values,
bool  ignore_zeros 
)
protected

Definition at line 184 of file metrics.py.

Variable Documentation

◆ _FlattenedSnapshot

pytest_userver.metrics._FlattenedSnapshot = typing.Set[typing.Tuple[str, Metric]]
protected

Definition at line 181 of file metrics.py.