aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/monlib/ut/py2/test.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2025-02-24 19:06:27 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2025-02-24 19:25:54 +0300
commitcc1540c72837350cff1b97ae8f6556088946e45d (patch)
tree4d5ece470c72b304ec1a7b29dfb0f0a6aea07c15 /library/python/monlib/ut/py2/test.py
parentb08a0cb057c1a81570f638038a0210dc167fa217 (diff)
downloadydb-cc1540c72837350cff1b97ae8f6556088946e45d.tar.gz
Intermediate changes
commit_hash:175403568527edd57aee48e05da080129d67f6de
Diffstat (limited to 'library/python/monlib/ut/py2/test.py')
-rw-r--r--library/python/monlib/ut/py2/test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/library/python/monlib/ut/py2/test.py b/library/python/monlib/ut/py2/test.py
index 4e389c47f1..0289168f04 100644
--- a/library/python/monlib/ut/py2/test.py
+++ b/library/python/monlib/ut/py2/test.py
@@ -252,6 +252,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]]],