acelyc111 commented on code in PR #1304:
URL:
https://github.com/apache/incubator-pegasus/pull/1304#discussion_r1064266714
##########
src/utils/metrics.cpp:
##########
@@ -177,6 +203,109 @@ void metric_entity::take_snapshot(metric_json_writer
&writer, const metric_filte
writer.EndObject();
}
+bool metric_entity::is_stale() const
+{
+ // Since this entity itself is still being accessed, its reference count
should be 1
+ // at least.
+ CHECK_GE(get_count(), 1);
+
+ // Once this entity did not have any metric, and had only one reference
kept in the
+ // registry, this entity would be considered useless.
+ return _metrics.empty() && get_count() == 1;
+}
+
+metric_entity::collected_old_metrics_info metric_entity::collect_old_metrics()
const
Review Comment:
what does 'old' mean?
--
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]