bneradt commented on code in PR #11297:
URL: https://github.com/apache/trafficserver/pull/11297#discussion_r1583243580
##########
include/tsutil/Metrics.h:
##########
@@ -506,6 +507,18 @@ class Metrics
}; // class Counter
+ class Derived
+ {
Review Comment:
Let's add doxygen comments explaining the responsibilities and purpose of
this class.
##########
include/tsutil/Metrics.h:
##########
@@ -506,6 +507,18 @@ class Metrics
}; // class Counter
+ class Derived
+ {
+ public:
+ struct DerivedMetricSpec {
+ std::string_view
derived_name;
+ std::initializer_list<std::variant<Metrics::AtomicType *,
Metrics::IdType, std::string_view>> derived_from;
+ };
+
+ static void derive(const std::initializer_list<DerivedMetricSpec>
&metrics);
+ static void update_derived();
Review Comment:
doxygen
##########
include/tsutil/Metrics.h:
##########
@@ -506,6 +507,18 @@ class Metrics
}; // class Counter
+ class Derived
+ {
+ public:
+ struct DerivedMetricSpec {
+ std::string_view
derived_name;
+ std::initializer_list<std::variant<Metrics::AtomicType *,
Metrics::IdType, std::string_view>> derived_from;
Review Comment:
A using alias for the variant could be helpful here.
--
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]