diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2022-07-26 10:19:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-07-26 11:32:37 +0000 |
commit | e7d2be0dae29265e2a6efafd4753debf11b9e96f (patch) | |
tree | 394a15ee762d5eee6abad5d492e35330789c6dcf /src/mongo/db/pipeline/pipeline.cpp | |
parent | e922e94ad274ef6d712d3a454a6d8427a736f2f6 (diff) | |
download | mongo-e7d2be0dae29265e2a6efafd4753debf11b9e96f.tar.gz |
SERVER-67101 Support microsecond precision in ScopedTimer
Diffstat (limited to 'src/mongo/db/pipeline/pipeline.cpp')
-rw-r--r-- | src/mongo/db/pipeline/pipeline.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/pipeline.cpp b/src/mongo/db/pipeline/pipeline.cpp index af52bd79435..73da96013dc 100644 --- a/src/mongo/db/pipeline/pipeline.cpp +++ b/src/mongo/db/pipeline/pipeline.cpp @@ -64,9 +64,10 @@ Value appendCommonExecStats(Value docSource, const CommonStats& stats) { invariant(docSource.getType() == BSONType::Object); MutableDocument doc(docSource.getDocument()); auto nReturned = static_cast<long long>(stats.advanced); - invariant(stats.executionTimeMillis); - auto executionTimeMillisEstimate = static_cast<long long>(*stats.executionTimeMillis); doc.addField("nReturned", Value(nReturned)); + + invariant(stats.executionTime); + auto executionTimeMillisEstimate = durationCount<Milliseconds>(*stats.executionTime); doc.addField("executionTimeMillisEstimate", Value(executionTimeMillisEstimate)); return Value(doc.freeze()); } |