diff options
Diffstat (limited to 'src/mongo/db/concurrency/flow_control_ticketholder.cpp')
-rw-r--r-- | src/mongo/db/concurrency/flow_control_ticketholder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/concurrency/flow_control_ticketholder.cpp b/src/mongo/db/concurrency/flow_control_ticketholder.cpp index b8f6217665c..4a8057159e1 100644 --- a/src/mongo/db/concurrency/flow_control_ticketholder.cpp +++ b/src/mongo/db/concurrency/flow_control_ticketholder.cpp @@ -101,7 +101,9 @@ void FlowControlTicketholder::getTicket(OperationContext* opCtx, auto currentWaitTime = curTimeMicros64(); auto updateTotalTime = [&]() { auto oldWaitTime = std::exchange(currentWaitTime, curTimeMicros64()); - _totalTimeAcquiringMicros.fetchAndAddRelaxed(currentWaitTime - oldWaitTime); + auto waitTimeDelta = currentWaitTime - oldWaitTime; + _totalTimeAcquiringMicros.fetchAndAddRelaxed(waitTimeDelta); + stats->timeAcquiringMicros += waitTimeDelta; }; stats->waiting = true; |