Look into consolidating calls to CurOp::elapsedTimeExcludingPauses

XMLWordPrintableJSON

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

      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
            Reporter:
            Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: