Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Currently, the Metric interface exposes a Future<double> value() of the current metric value. This means that for synchronous metrics, like Counter and PushGauge, there has to be (1) a memory allocation for the Future's shared pointer, as well as (2) continuations set up when the future is ready within process::await.
(2) Could be eliminated without changing the Metric interface by checking to see if value.isReady() and if so extracting the value rather than using process::await.
(1) Could be eliminated by having two types of metrics, e.g. Metric / AsyncMetric. Or by having two methods, e.g. value() / async_value(), along with a bool async() indicator of which one should be called.
Attachments
Issue Links
- is related to
-
MESOS-9072 Improve performance of metrics snapshot.
- Accepted