empiredan commented on code in PR #2085:
URL: 
https://github.com/apache/incubator-pegasus/pull/2085#discussion_r1728314577


##########
src/shell/commands/node_management.cpp:
##########
@@ -232,6 +234,160 @@ dsn::metric_filters rw_requests_filters()
     return filters;
 }
 
+dsn::metric_filters server_stat_filters()
+{
+    dsn::metric_filters filters;
+    filters.with_metric_fields = {dsn::kMetricNameField, 
dsn::kMetricSingleValueField};
+    filters.entity_types = {"server"};
+    filters.entity_metrics = {"virtual_mem_usage_mb", "resident_mem_usage_mb"};

Review Comment:
   These names of metrics have been defined, initialized and set as following 
statements, thus I think we could just keep them in the format of strings.
   
   ```C++
   METRIC_DEFINE_gauge_int64(server,
                             virtual_mem_usage_mb,
                             dsn::metric_unit::kMegaBytes,
                             "The total amount of virtual memory usage in MB");
   
   METRIC_VAR_INIT_server(virtual_mem_usage_mb)
   
   METRIC_VAR_SET(virtual_mem_usage_mb, virt_mb);
   ```
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to