[SERVER-67101] Support microsecond precision in ScopedTimer Created: 08/Jun/22  Updated: 29/Oct/23  Resolved: 28/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Ruoxin Xu Assignee: Ruoxin Xu
Resolution: Fixed Votes: 0
Labels: M2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Related
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-06-13, QO 2022-06-27, QO 2022-07-11, QO 2022-07-25, QO 2022-08-08
Participants:
Linked BF Score: 1

 Description   

We should collect more precise estimates of execution time. The ScopedTimer currently uses a SystemClockSource which only has millisecond precision generating imprecise and unstable estimates in some cases. Consider replacing the SystemClockSource with the SystemTickSource.

Expected outcome of this ticket:

  1. "executionTimeMillisEstimate" in the explain output should be more precise.
  2. Introduce an additional field "executionTimeMicrosEstimate" in the explain output for cost calibration use. This new field should be guarded by an internal query knob. It will be added to the explain output only if requested. 


 Comments   
Comment by Githook User [ 27/Jul/22 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-67101 Support microsecond precision in ScopedTimer
Branch: master
https://github.com/mongodb/mongo/commit/331153cb62f0e0d0545a5906c3bcc17a90bea02c

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: Revert "SERVER-67101 Support microsecond precision in ScopedTimer"

This reverts commit e7d2be0dae29265e2a6efafd4753debf11b9e96f.
Branch: master
https://github.com/mongodb/mongo/commit/b650ffdb53cd642f43a9105e0478b922e65f08cd

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com', 'username': 'RuoxinXu'}

Message: SERVER-67101 Support microsecond precision in ScopedTimer
Branch: master
https://github.com/mongodb/mongo/commit/e7d2be0dae29265e2a6efafd4753debf11b9e96f

Generated at Thu Feb 08 06:07:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.