Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8964

Avoid performance penalty of Future for Counters and PushGauges.

    XMLWordPrintableJSON

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

          Activity

            People

              Unassigned Unassigned
              bmahler Benjamin Mahler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: