diff --git a/src/meta/meta_data.cpp b/src/meta/meta_data.cpp index 46cd8ac5cd..33af192627 100644 --- a/src/meta/meta_data.cpp +++ b/src/meta/meta_data.cpp @@ -235,7 +235,7 @@ void proposal_actions::track_current_learner(const dsn::rpc_address &node, const current_learner.last_committed_decree > info.last_committed_decree || current_learner.last_prepared_decree > info.last_prepared_decree) { - // TODO: need to add a perf counter here + // TODO: need to add a metric here. LOG_WARNING("{}: learner({})'s progress step back, please trace this carefully", info.pid, node); diff --git a/src/replica/bulk_load/replica_bulk_loader.h b/src/replica/bulk_load/replica_bulk_loader.h index 5559f6d4a0..92f76810cd 100644 --- a/src/replica/bulk_load/replica_bulk_loader.h +++ b/src/replica/bulk_load/replica_bulk_loader.h @@ -194,7 +194,8 @@ class replica_bulk_loader : replica_base std::map _download_files_task; // download metadata and create download file tasks task_ptr _download_task; - // Used for perf-counter + + // Used for metrics. uint64_t _bulk_load_start_time_ms{0}; METRIC_VAR_DECLARE_counter(bulk_load_downloading_count); diff --git a/src/replica/duplication/mutation_batch.cpp b/src/replica/duplication/mutation_batch.cpp index 8b7a815fca..e6d91d5f29 100644 --- a/src/replica/duplication/mutation_batch.cpp +++ b/src/replica/duplication/mutation_batch.cpp @@ -74,7 +74,7 @@ void mutation_buffer::commit(decree d, commit_type ct) // n+m(m>1) n+k(k>=m) // // just LOG_ERROR but not CHECK if mutation loss or other problem, it's different from - // base class implement. And from the error and perf-counter, we can choose restart + // base class implement. And based on the error and metric, we can choose to restart // duplication or ignore the loss. if (next_committed_mutation == nullptr || !next_committed_mutation->is_logged()) { LOG_ERROR_PREFIX("mutation[{}] is lost in prepare_list: " diff --git a/src/replica/replica.h b/src/replica/replica.h index 83e78105aa..8ba5bde32a 100644 --- a/src/replica/replica.h +++ b/src/replica/replica.h @@ -641,7 +641,6 @@ class replica : public serverlet, public ref_counter, public replica_ba std::unique_ptr _replica_follower; - // perf counters METRIC_VAR_DECLARE_gauge_int64(private_log_size_mb); METRIC_VAR_DECLARE_counter(throttling_delayed_write_requests); METRIC_VAR_DECLARE_counter(throttling_rejected_write_requests); diff --git a/src/replica/replica_context.h b/src/replica/replica_context.h index 32da41d38b..3b6220fa2a 100644 --- a/src/replica/replica_context.h +++ b/src/replica/replica_context.h @@ -285,7 +285,7 @@ class partition_split_context // see more in function `child_check_split_context` and `parent_check_states` task_ptr check_state_task; - // Used for split related perf-counter + // Used for split-related metrics. uint64_t splitting_start_ts_ns{0}; uint64_t splitting_start_async_learn_ts_ns{0}; uint64_t splitting_copy_file_count{0}; diff --git a/src/replica/split/replica_split_manager.h b/src/replica/split/replica_split_manager.h index 7435e1705d..00c6f81ef9 100644 --- a/src/replica/split/replica_split_manager.h +++ b/src/replica/split/replica_split_manager.h @@ -94,7 +94,7 @@ class replica_split_manager : replica_base uint64_t total_file_size, decree last_committed_decree); - // TODO(heyuchen): total_file_size is used for split perf-counter in further pull request + // TODO(heyuchen): total_file_size is used for split-related metrics in further pull request. // Applies mutation logs that were learned from the parent of this child. // This stage follows after that child applies the checkpoint of parent, and begins to apply the // mutations. diff --git a/src/runtime/profiler.h b/src/runtime/profiler.h index d283a5b4ae..a4630d226a 100644 --- a/src/runtime/profiler.h +++ b/src/runtime/profiler.h @@ -34,8 +34,8 @@ Profiler toollet -This toollet collects many performance counter values for the specified tasks, -as configed below. +This toollet collects many performance metrics for the specified tasks, +as configured below.
 
diff --git a/src/server/pegasus_write_service.h b/src/server/pegasus_write_service.h
index 18db638176..eed596e355 100644
--- a/src/server/pegasus_write_service.h
+++ b/src/server/pegasus_write_service.h
@@ -239,7 +239,7 @@ class pegasus_write_service : dsn::replication::replica_base
     uint32_t _put_batch_size;
     uint32_t _remove_batch_size;
 
-    // TODO(wutao1): add perf counters for failed rpc.
+    // TODO(wutao1): add metrics for failed rpc.
 };
 
 } // namespace server
diff --git a/src/server/test/pegasus_server_impl_test.cpp b/src/server/test/pegasus_server_impl_test.cpp
index 0508e7ce56..a1cf77db4c 100644
--- a/src/server/test/pegasus_server_impl_test.cpp
+++ b/src/server/test/pegasus_server_impl_test.cpp
@@ -53,13 +53,13 @@ class pegasus_server_impl_test : public pegasus_server_test_base
 
     void test_table_level_slow_query()
     {
-        // the on_get function will sleep 10ms for unit test,
-        // so when we set slow_query_threshold <= 10ms, the perf counter will be incr by 1
+        // The function `on_get` will sleep 10ms for the unit test. Thus when we set
+        // slow_query_threshold <= 10ms, the metric `abnormal_read_requests` will increment by 1.
         struct test_case
         {
             bool is_multi_get; // false-on_get, true-on_multi_get
             uint64_t slow_query_threshold_ms;
-            uint8_t expect_perf_counter_incr;
+            uint8_t expected_incr;
         } tests[] = {{false, 10, 1}, {false, 300, 0}, {true, 10, 1}, {true, 300, 0}};
 
         // test key
@@ -93,7 +93,7 @@ class pegasus_server_impl_test : public pegasus_server_test_base
             }
             auto after_count = _server->METRIC_VAR_VALUE(abnormal_read_requests);
 
-            ASSERT_EQ(before_count + test.expect_perf_counter_incr, after_count);
+            ASSERT_EQ(before_count + test.expected_incr, after_count);
         }
     }
 
diff --git a/src/utils/api_utilities.h b/src/utils/api_utilities.h
index 537ceaaedd..ec0733ae5c 100644
--- a/src/utils/api_utilities.h
+++ b/src/utils/api_utilities.h
@@ -24,10 +24,7 @@
  * THE SOFTWARE.
  */
 
-// some useful utility functions provided by rDSN,
-// such as logging, performance counter, checksum,
-// command line interface registration and invocation,
-// etc.
+// Some useful utility functions for logging and mocking provided by rDSN.
 
 #pragma once