Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(split): add table level split reject counters #804

Merged
merged 3 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/server/info_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ info_collector::app_stat_counters *info_collector::get_app_counters(const std::s
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(recent_write_splitting_reject_count);
INIT_COUNTER(recent_read_splitting_reject_count);
INIT_COUNTER(storage_mb);
INIT_COUNTER(storage_count);
INIT_COUNTER(rdb_block_cache_hit_rate);
Expand Down
4 changes: 4 additions & 0 deletions src/server/info_collector.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class info_collector
row_stats.recent_backup_request_throttling_delay_count);
recent_backup_request_throttling_reject_count->set(
row_stats.recent_backup_request_throttling_reject_count);
recent_write_splitting_reject_count->set(row_stats.recent_write_splitting_reject_count);
recent_read_splitting_reject_count->set(row_stats.recent_read_splitting_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(
Expand Down Expand Up @@ -149,6 +151,8 @@ class info_collector
::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 recent_write_splitting_reject_count;
::dsn::perf_counter_wrapper recent_read_splitting_reject_count;
::dsn::perf_counter_wrapper storage_mb;
::dsn::perf_counter_wrapper storage_count;
::dsn::perf_counter_wrapper rdb_block_cache_hit_rate;
Expand Down
8 changes: 8 additions & 0 deletions src/shell/command_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ struct row_data
row.recent_backup_request_throttling_delay_count;
recent_backup_request_throttling_reject_count +=
row.recent_backup_request_throttling_reject_count;
recent_write_splitting_reject_count += row.recent_write_splitting_reject_count;
recent_read_splitting_reject_count += row.recent_read_splitting_reject_count;
storage_mb += row.storage_mb;
storage_count += row.storage_count;
rdb_block_cache_hit_count += row.rdb_block_cache_hit_count;
Expand Down Expand Up @@ -684,6 +686,8 @@ struct row_data
double recent_read_throttling_reject_count = 0;
double recent_backup_request_throttling_delay_count = 0;
double recent_backup_request_throttling_reject_count = 0;
double recent_write_splitting_reject_count = 0;
double recent_read_splitting_reject_count = 0;
double storage_mb = 0;
double storage_count = 0;
double rdb_block_cache_hit_count = 0;
Expand Down Expand Up @@ -766,6 +770,10 @@ update_app_pegasus_perf_counter(row_data &row, const std::string &counter_name,
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 == "recent.write.splitting.reject.count")
row.recent_write_splitting_reject_count += value;
else if (counter_name == "recent.read.splitting.reject.count")
row.recent_read_splitting_reject_count += value;
else if (counter_name == "disk.storage.sst(MB)")
row.storage_mb += value;
else if (counter_name == "disk.storage.sst.count")
Expand Down
2 changes: 2 additions & 0 deletions src/shell/commands/table_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ bool app_stat(command_executor *e, shell_context *sc, arguments args)
row.recent_backup_request_throttling_delay_count;
sum.recent_backup_request_throttling_reject_count +=
row.recent_backup_request_throttling_reject_count;
sum.recent_write_splitting_reject_count += row.recent_write_splitting_reject_count;
sum.recent_read_splitting_reject_count += row.recent_read_splitting_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;
Expand Down