|
Since SERVER-43987 we record the wait time to get a flow control ticket even when a ticket is immediately available. This ends up just recording the time it takes to make system calls, and also adds a small (5-10us) additional overhead on operations which take obtain a flow control ticket. We should not record wait time when a ticket is immediately available. Additionally we should use a clock source rather than making direct system calls to get the wait time. Since this is a token-bucket algorithm refreshing every second, the fast clock source (10ms precision) should be precise enough.
|