ZhengweiZhu commented on code in PR #2899:
URL: https://github.com/apache/brpc/pull/2899#discussion_r1988329326


##########
src/bvar/multi_dimension_inl.h:
##########
@@ -252,7 +252,7 @@ size_t MultiDimension<T>::dump(Dumper* dumper, const 
DumpOptions* options) {
         bvar->describe(oss, options->quote_string);
         std::ostringstream oss_key;
         make_dump_key(oss_key, label_name);
-        if (!dumper->dump(oss_key.str(), oss.str())) {
+        if (!dumper->dump_mvar(oss_key.str(), oss.str())) {

Review Comment:
   > I think it would be better to pass `label_names` to `dump_mvar`.
   
   @chenBright   Do you mean to pass `std::vector<key_type> label_names` 
variable to dump_mvar so it can list all labels and its related bvar instance 
for output? The key point is that the methods (list_stats, get_stats_impl ) 
required to do that is defined in MultiDimension template class, instead of in 
bvar::Dumper class.  Maybe we can achieve it technically but it breaks the 
principle of closure, as the dumper class should only care about `dumping` and 
not care about the detail of mvar.
   
   



-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to