You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by zh...@apache.org on 2021/07/14 07:01:27 UTC

[incubator-pegasus] branch master updated: feat: add perf counter for backup request limiter (#779)

This is an automated email from the ASF dual-hosted git repository.

zhaoliwei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new f27ff9a  feat: add perf counter for backup request limiter (#779)
f27ff9a is described below

commit f27ff9a084d10b2ba43312bf68aade805d745644
Author: zhao liwei <zl...@163.com>
AuthorDate: Wed Jul 14 15:01:06 2021 +0800

    feat: add perf counter for backup request limiter (#779)
---
 rdsn                                    |  2 +-
 src/server/info_collector.cpp           |  2 ++
 src/server/info_collector.h             |  6 ++++++
 src/shell/command_helper.h              | 10 ++++++++++
 src/shell/commands/table_management.cpp |  4 ++++
 5 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/rdsn b/rdsn
index aedc988..1275b1b 160000
--- a/rdsn
+++ b/rdsn
@@ -1 +1 @@
-Subproject commit aedc988362feca3cd9e3c87b22306c7f7910cfc1
+Subproject commit 1275b1bfe886289900f29a7091f6697257a11a6f
diff --git a/src/server/info_collector.cpp b/src/server/info_collector.cpp
index 3cfd29f..0194812 100644
--- a/src/server/info_collector.cpp
+++ b/src/server/info_collector.cpp
@@ -215,6 +215,8 @@ info_collector::app_stat_counters *info_collector::get_app_counters(const std::s
     INIT_COUNTER(recent_write_throttling_reject_count);
     INIT_COUNTER(recent_read_throttling_delay_count);
     INIT_COUNTER(recent_read_throttling_reject_count);
+    INIT_COUNTER(recent_backup_request_throttling_delay_count);
+    INIT_COUNTER(recent_backup_request_throttling_reject_count);
     INIT_COUNTER(storage_mb);
     INIT_COUNTER(storage_count);
     INIT_COUNTER(rdb_block_cache_hit_rate);
diff --git a/src/server/info_collector.h b/src/server/info_collector.h
index 4c54dbe..96a70b6 100644
--- a/src/server/info_collector.h
+++ b/src/server/info_collector.h
@@ -75,6 +75,10 @@ public:
                 row_stats.recent_write_throttling_reject_count);
             recent_read_throttling_delay_count->set(row_stats.recent_read_throttling_delay_count);
             recent_read_throttling_reject_count->set(row_stats.recent_read_throttling_reject_count);
+            recent_backup_request_throttling_delay_count->set(
+                row_stats.recent_backup_request_throttling_delay_count);
+            recent_backup_request_throttling_reject_count->set(
+                row_stats.recent_backup_request_throttling_reject_count);
             storage_mb->set(row_stats.storage_mb);
             storage_count->set(row_stats.storage_count);
             rdb_block_cache_hit_rate->set(convert_to_1M_ratio(
@@ -129,6 +133,8 @@ public:
         ::dsn::perf_counter_wrapper recent_write_throttling_reject_count;
         ::dsn::perf_counter_wrapper recent_read_throttling_delay_count;
         ::dsn::perf_counter_wrapper recent_read_throttling_reject_count;
+        ::dsn::perf_counter_wrapper recent_backup_request_throttling_delay_count;
+        ::dsn::perf_counter_wrapper recent_backup_request_throttling_reject_count;
         ::dsn::perf_counter_wrapper storage_mb;
         ::dsn::perf_counter_wrapper storage_count;
         ::dsn::perf_counter_wrapper rdb_block_cache_hit_rate;
diff --git a/src/shell/command_helper.h b/src/shell/command_helper.h
index c5178c0..62efeac 100644
--- a/src/shell/command_helper.h
+++ b/src/shell/command_helper.h
@@ -622,6 +622,10 @@ struct row_data
         recent_write_throttling_reject_count += row.recent_write_throttling_reject_count;
         recent_read_throttling_delay_count += row.recent_read_throttling_delay_count;
         recent_read_throttling_reject_count += row.recent_read_throttling_reject_count;
+        recent_backup_request_throttling_delay_count +=
+            row.recent_backup_request_throttling_delay_count;
+        recent_backup_request_throttling_reject_count +=
+            row.recent_backup_request_throttling_reject_count;
         storage_mb += row.storage_mb;
         storage_count += row.storage_count;
         rdb_block_cache_hit_count += row.rdb_block_cache_hit_count;
@@ -670,6 +674,8 @@ struct row_data
     double recent_write_throttling_reject_count = 0;
     double recent_read_throttling_delay_count = 0;
     double recent_read_throttling_reject_count = 0;
+    double recent_backup_request_throttling_delay_count = 0;
+    double recent_backup_request_throttling_reject_count = 0;
     double storage_mb = 0;
     double storage_count = 0;
     double rdb_block_cache_hit_count = 0;
@@ -740,6 +746,10 @@ update_app_pegasus_perf_counter(row_data &row, const std::string &counter_name,
         row.recent_read_throttling_delay_count += value;
     else if (counter_name == "recent.read.throttling.reject.count")
         row.recent_read_throttling_reject_count += value;
+    else if (counter_name == "recent.backup.request.throttling.delay.count")
+        row.recent_backup_request_throttling_delay_count += value;
+    else if (counter_name == "recent.backup.request.throttling.reject.count")
+        row.recent_backup_request_throttling_reject_count += value;
     else if (counter_name == "disk.storage.sst(MB)")
         row.storage_mb += value;
     else if (counter_name == "disk.storage.sst.count")
diff --git a/src/shell/commands/table_management.cpp b/src/shell/commands/table_management.cpp
index 58cc09f..272b5d8 100644
--- a/src/shell/commands/table_management.cpp
+++ b/src/shell/commands/table_management.cpp
@@ -507,6 +507,10 @@ bool app_stat(command_executor *e, shell_context *sc, arguments args)
         sum.recent_write_throttling_reject_count += row.recent_write_throttling_reject_count;
         sum.recent_read_throttling_delay_count += row.recent_read_throttling_delay_count;
         sum.recent_read_throttling_reject_count += row.recent_read_throttling_reject_count;
+        sum.recent_backup_request_throttling_delay_count +=
+            row.recent_backup_request_throttling_delay_count;
+        sum.recent_backup_request_throttling_reject_count +=
+            row.recent_backup_request_throttling_reject_count;
         sum.storage_mb += row.storage_mb;
         sum.storage_count += row.storage_count;
         sum.rdb_block_cache_hit_count += row.rdb_block_cache_hit_count;

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org