diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-05-02 10:55:01 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-05-23 10:28:31 -0400 |
commit | 2e627487ef0475c46143b5f57d3e7c3d3027d5dc (patch) | |
tree | 7ad552be9a3cae113bc3cfd9df0faea78aa50e24 /src/mongo/db/ftdc | |
parent | c9aac9d6eaba6ef2eb8903f07e997b594e88addc (diff) | |
download | mongo-2e627487ef0475c46143b5f57d3e7c3d3027d5dc.tar.gz |
SERVER-18277 Track elapsed time on cursors using microsecond resolution on OperationContext.
This completes the mechanics of moving max-time tracking to OperationContext and
switching the checkForInterrupt checks to use the service context's fast clock
source, while tracking the amount of execution time remaining on a cursor with
microsecond granularity to ensure that remaining execution time always declines,
even for very brief operations on cursors.
This patch does not complete the transition from wait_for waiting to wait_until
waiting in all places that do waiting based on operation deadlines.
Diffstat (limited to 'src/mongo/db/ftdc')
-rw-r--r-- | src/mongo/db/ftdc/ftdc_test.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/db/ftdc/ftdc_test.cpp b/src/mongo/db/ftdc/ftdc_test.cpp index fe10d5db21e..b09aa2b6ef5 100644 --- a/src/mongo/db/ftdc/ftdc_test.cpp +++ b/src/mongo/db/ftdc/ftdc_test.cpp @@ -44,6 +44,7 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source.h" #include "mongo/util/clock_source_mock.h" +#include "mongo/util/tick_source_mock.h" namespace mongo { @@ -114,6 +115,7 @@ MONGO_INITIALIZER_WITH_PREREQUISITES(FTDCTestInit, getGlobalServiceContext()->setFastClockSource(stdx::make_unique<ClockSourceMock>()); getGlobalServiceContext()->setPreciseClockSource(stdx::make_unique<ClockSourceMock>()); + getGlobalServiceContext()->setTickSource(stdx::make_unique<TickSourceMock>()); Client::initThreadIfNotAlready("UnitTest"); |