From 88e9e0ffe43077110cd565ccee9606dd96b2de73 Mon Sep 17 00:00:00 2001 From: Yingchun Lai Date: Fri, 10 Nov 2023 00:44:47 +0800 Subject: [PATCH] 2 --- src/server/hotspot_partition_calculator.cpp | 4 ++-- src/server/info_collector.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/hotspot_partition_calculator.cpp b/src/server/hotspot_partition_calculator.cpp index 7f8920ff5d..59ffce7b63 100644 --- a/src/server/hotspot_partition_calculator.cpp +++ b/src/server/hotspot_partition_calculator.cpp @@ -84,7 +84,7 @@ void hotspot_partition_calculator::init_perf_counter(int partition_count) { for (int data_type = 0; data_type <= 1; data_type++) { for (int i = 0; i < partition_count; i++) { - string partition_desc = + std::string partition_desc = _app_name + '.' + (data_type == partition_qps_type::WRITE_HOTSPOT_DATA ? "write." : "read.") + std::to_string(i); @@ -95,7 +95,7 @@ void hotspot_partition_calculator::init_perf_counter(int partition_count) "app.pegasus", counter_name.c_str(), COUNTER_TYPE_NUMBER, counter_desc.c_str()); } - string total_desc = + std::string total_desc = _app_name + '.' + (data_type == partition_qps_type::WRITE_HOTSPOT_DATA ? "write.total" : "read.total"); std::string counter_name = fmt::format("app.stat.hotspots.{}", total_desc); diff --git a/src/server/info_collector.h b/src/server/info_collector.h index 32c5baed91..649d0dee09 100644 --- a/src/server/info_collector.h +++ b/src/server/info_collector.h @@ -232,7 +232,7 @@ class info_collector ::dsn::task_ptr _storage_size_stat_timer_task; ::dsn::utils::ex_lock_nr _capacity_unit_update_info_lock; // mapping 'node address' --> 'last updated timestamp' - std::map _capacity_unit_update_info; + std::map _capacity_unit_update_info; // _hotspot_calculator_store is to save hotspot_partition_calculator for each table, a // hotspot_partition_calculator saves historical hotspot data and alert perf_counters of // corresponding table