diff options
author | alexnick <alexnick@ydb.tech> | 2023-04-03 21:38:46 +0300 |
---|---|---|
committer | alexnick <alexnick@ydb.tech> | 2023-04-03 21:38:46 +0300 |
commit | 2c8dffd1a8e3b4bd1671b6159bcfd0c27ef92147 (patch) | |
tree | 945a025244640e0c2c2ecc128a2b49ee04b5cf9a | |
parent | 27b14b315a118faf48417aca7129751dd017be8e (diff) | |
download | ydb-2c8dffd1a8e3b4bd1671b6159bcfd0c27ef92147.tar.gz |
aggregated metrics for topics from PQRB; fix for tests
fix for tests
-rw-r--r-- | ydb/core/persqueue/ut/counters_ut.cpp | 12 | ||||
-rw-r--r-- | ydb/core/persqueue/ut/resources/counters_topics.html | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/ydb/core/persqueue/ut/counters_ut.cpp b/ydb/core/persqueue/ut/counters_ut.cpp index d74a8111913..f65e6b63f37 100644 --- a/ydb/core/persqueue/ut/counters_ut.cpp +++ b/ydb/core/persqueue/ut/counters_ut.cpp @@ -315,6 +315,18 @@ Y_UNIT_TEST(PartitionFirstClass) { { auto counters = tc.Runtime->GetAppData(0).Counters; auto dbGroup = GetServiceCounters(counters, "topics_serverless", false); + + auto group = dbGroup->GetSubgroup("host", "")->GetSubgroup("database", "/Root")->GetSubgroup("cloud_id", "cloud_id")->GetSubgroup("folder_id", "folder_id") + ->GetSubgroup("database_id", "database_id")->GetSubgroup("topic", "topic"); + group->GetNamedCounter("name", "topic.partition.uptime_milliseconds_min", false)->Set(30000); + group->GetNamedCounter("name", "topic.partition.write.lag_milliseconds_max", false)->Set(600); + group->GetNamedCounter("name", "topic.partition.uptime_milliseconds_min", false)->Set(30000); + group->GetNamedCounter("name", "topic.partition.write.lag_milliseconds_max", false)->Set(600); + group = group->GetSubgroup("consumer", "client"); + group->GetNamedCounter("name", "topic.partition.end_to_end_lag_milliseconds_max", false)->Set(30000); + group->GetNamedCounter("name", "topic.partition.read.idle_milliseconds_max", false)->Set(30000); + group->GetNamedCounter("name", "topic.partition.write.lag_milliseconds_max", false)->Set(200); + TStringStream countersStr; dbGroup->OutputHtml(countersStr); const TString referenceCounters = NResource::Find(TStringBuf("counters_topics.html")); diff --git a/ydb/core/persqueue/ut/resources/counters_topics.html b/ydb/core/persqueue/ut/resources/counters_topics.html index fc7e7bc5bd1..902fcca125b 100644 --- a/ydb/core/persqueue/ut/resources/counters_topics.html +++ b/ydb/core/persqueue/ut/resources/counters_topics.html @@ -15,12 +15,12 @@ host=: name=topic.partition.producers_count_max: 3 name=topic.partition.storage_bytes_max: 747 name=topic.partition.total_count: 2 - name=topic.partition.uptime_milliseconds_min: 30342 + name=topic.partition.uptime_milliseconds_min: 30000 name=topic.partition.write.bytes_per_day_max: 540 name=topic.partition.write.bytes_per_hour_max: 540 name=topic.partition.write.bytes_per_minute_max: 540 name=topic.partition.write.idle_milliseconds_max: 0 - name=topic.partition.write.lag_milliseconds_max: 641 + name=topic.partition.write.lag_milliseconds_max: 600 name=topic.partition.write.speed_limit_bytes_per_second: 50000000 name=topic.partition.write.throttled_nanoseconds_max: 0 name=topic.producers_count: 3 @@ -31,10 +31,10 @@ host=: name=topic.partition.committed_end_to_end_lag_milliseconds_max: 0 name=topic.partition.committed_lag_messages_max: 30 name=topic.partition.committed_read_lag_milliseconds_max: 0 - name=topic.partition.end_to_end_lag_milliseconds_max: 30581 - name=topic.partition.read.idle_milliseconds_max: 30342 + name=topic.partition.end_to_end_lag_milliseconds_max: 30000 + name=topic.partition.read.idle_milliseconds_max: 30000 name=topic.partition.read.lag_messages_max: 29 name=topic.partition.read.lag_milliseconds_max: 0 - name=topic.partition.write.lag_milliseconds_max: 239 + name=topic.partition.write.lag_milliseconds_max: 200 name=topic.read.lag_messages: 29 </pre> |