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


##########
src/utils/metrics.h:
##########
@@ -209,8 +201,19 @@ class metric_entity : public ref_counter
     };
     void close(close_option option);
 
-    void set_attributes(attr_map &&attrs);
+    void set_attributes(const attr_map &attrs);
+
+    void encode_type(metric_json_writer &writer) const;
+
+    void encode_id(metric_json_writer &writer) const;
+
+    static void encode_attrs(metric_json_writer &writer, const attr_map 
&attrs);

Review Comment:
   Good advice, I'll move this function to `.cpp`. 



##########
src/utils/metrics.h:
##########
@@ -209,8 +201,19 @@ class metric_entity : public ref_counter
     };
     void close(close_option option);
 
-    void set_attributes(attr_map &&attrs);
+    void set_attributes(const attr_map &attrs);
+
+    void encode_type(metric_json_writer &writer) const;
+
+    void encode_id(metric_json_writer &writer) const;
+
+    static void encode_attrs(metric_json_writer &writer, const attr_map 
&attrs);
 
+    static void encode_metrics(metric_json_writer &writer,

Review Comment:
   OK.



-- 
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