Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-77184

Look into consolidating calls to CurOp::elapsedTimeExcludingPauses

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc8
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization
    • Fully Compatible
    • QO 2023-05-29, QO 2023-06-26, QO 2023-07-24
    • 161

      We currently call CurOp::elapsedTimeExcludingPauses twice: (1) first in CurOp::setEndOfOpMetrics, (2) then in CurOp::completeAndLogOperation. We added (1) for query stats since (2) isn't called untilĀ after writeTelemetry. However, the cost of the system tick source (used to calculate the time elapsed) isn't negligible, so it'd be great to see if we can consolidate those two calls into one.

      It'd be easiest to remove (2), but that would change behavior of the opDebug "executionTime" metric since it'd always be calculated slightly earlier in the completion of an operation. I'm not sure how we'd remove (1) without fundamentally changing query stats infrastructure.

            Assignee:
            maddie.zechar@mongodb.com Maddie Zechar
            Reporter:
            will.buerger@mongodb.com Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: