diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2025-02-24 19:06:27 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2025-02-24 19:25:54 +0300 |
commit | cc1540c72837350cff1b97ae8f6556088946e45d (patch) | |
tree | 4d5ece470c72b304ec1a7b29dfb0f0a6aea07c15 /library/python/monlib/ut/py3/test.py | |
parent | b08a0cb057c1a81570f638038a0210dc167fa217 (diff) | |
download | ydb-cc1540c72837350cff1b97ae8f6556088946e45d.tar.gz |
Intermediate changes
commit_hash:175403568527edd57aee48e05da080129d67f6de
Diffstat (limited to 'library/python/monlib/ut/py3/test.py')
-rw-r--r-- | library/python/monlib/ut/py3/test.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/python/monlib/ut/py3/test.py b/library/python/monlib/ut/py3/test.py index 5a68c1653e..bbb2b42bca 100644 --- a/library/python/monlib/ut/py3/test.py +++ b/library/python/monlib/ut/py3/test.py @@ -250,6 +250,16 @@ def test_gauge_sensors(): assert ig.get() == 5 +def test_counter(): + registry = MetricRegistry() + c = registry.counter({'a': 'b'}) + + assert c.inc() == 1 + assert c.add(2) == 3 + c.reset() + assert c.get() == 0 + + UNISTAT_DATA = """[ ["signal1_max", 10], ["signal2_hgram", [[0, 100], [50, 200], [200, 300]]], |