diff options
author | ivanzhukov <ivanzhukov@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
commit | 0892d79ab411592ad25175c4bdadbcb09b466cf5 (patch) | |
tree | 98dfdd45463c9bd747101748a9ca25d2917390fd /library/cpp/monlib/metrics/metric_registry_ut.cpp | |
parent | 1b7466cb957659079ebebbb5d76e64e51f3306f0 (diff) | |
download | ydb-0892d79ab411592ad25175c4bdadbcb09b466cf5.tar.gz |
Restoring authorship annotation for <ivanzhukov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/monlib/metrics/metric_registry_ut.cpp')
-rw-r--r-- | library/cpp/monlib/metrics/metric_registry_ut.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/monlib/metrics/metric_registry_ut.cpp b/library/cpp/monlib/metrics/metric_registry_ut.cpp index 86d9a52ec0..58512ccace 100644 --- a/library/cpp/monlib/metrics/metric_registry_ut.cpp +++ b/library/cpp/monlib/metrics/metric_registry_ut.cpp @@ -45,16 +45,16 @@ Y_UNIT_TEST_SUITE(TMetricRegistryTest) { UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 0.0, 1E-6); g->Set(12.34); UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 12.34, 1E-6); - - double val; - - val = g->Add(1.2); - UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 13.54, 1E-6); - UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), val, 1E-6); - - val = g->Add(-3.47); - UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 10.07, 1E-6); - UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), val, 1E-6); + + double val; + + val = g->Add(1.2); + UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 13.54, 1E-6); + UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), val, 1E-6); + + val = g->Add(-3.47); + UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), 10.07, 1E-6); + UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), val, 1E-6); } Y_UNIT_TEST(LazyGauge) { @@ -75,35 +75,35 @@ Y_UNIT_TEST_SUITE(TMetricRegistryTest) { UNIT_ASSERT_DOUBLES_EQUAL(g->Get(), val, 1E-6); } - Y_UNIT_TEST(IntGauge) { + Y_UNIT_TEST(IntGauge) { TMetricRegistry registry(TLabels{{"common", "label"}}); - TIntGauge* g = registry.IntGauge({{"my", "gauge"}}); - + TIntGauge* g = registry.IntGauge({{"my", "gauge"}}); + UNIT_ASSERT_VALUES_EQUAL(g->Get(), 0); - - i64 val; - - val = g->Inc(); + + i64 val; + + val = g->Inc(); UNIT_ASSERT_VALUES_EQUAL(g->Get(), 1); UNIT_ASSERT_VALUES_EQUAL(g->Get(), val); - - val = g->Dec(); + + val = g->Dec(); UNIT_ASSERT_VALUES_EQUAL(g->Get(), 0); UNIT_ASSERT_VALUES_EQUAL(g->Get(), val); - - val = g->Add(1); + + val = g->Add(1); UNIT_ASSERT_VALUES_EQUAL(g->Get(), 1); UNIT_ASSERT_VALUES_EQUAL(g->Get(), val); - - val = g->Add(2); + + val = g->Add(2); UNIT_ASSERT_VALUES_EQUAL(g->Get(), 3); UNIT_ASSERT_VALUES_EQUAL(g->Get(), val); - - val = g->Add(-5); + + val = g->Add(-5); UNIT_ASSERT_VALUES_EQUAL(g->Get(), -2); UNIT_ASSERT_VALUES_EQUAL(g->Get(), val); - } - + } + Y_UNIT_TEST(LazyIntGauge) { TMetricRegistry registry(TLabels{{"common", "label"}}); i64 val = 0; |