diff options
author | William Schultz <william.schultz@mongodb.com> | 2018-10-02 21:54:58 -0400 |
---|---|---|
committer | William Schultz <william.schultz@mongodb.com> | 2018-10-02 21:57:52 -0400 |
commit | 982ba21e0ffbdaaf766dc8fa060728ba9b5f4914 (patch) | |
tree | efc760c482e30bd70bfbaf5854779a89acf00ef3 /src/mongo/s/sharding_router_test_fixture.cpp | |
parent | 23d7c89e501d221a41f350b0b10a52a4f05bb2e2 (diff) | |
download | mongo-982ba21e0ffbdaaf766dc8fa060728ba9b5f4914.tar.gz |
SERVER-36697 Utilize TickSource for transactions timing metrics
This patch converts the existing transactions diagnostics timing related
metrics to use a TickSource to record transaction durations. The
TickSource is a high precision, mock-able time source for measuring
the passage of time. This patch also converts the existing unit tests
to use a mock TickSource, which allows the tests to fully virtualize
time, making them much faster and less flaky.
Diffstat (limited to 'src/mongo/s/sharding_router_test_fixture.cpp')
-rw-r--r-- | src/mongo/s/sharding_router_test_fixture.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/s/sharding_router_test_fixture.cpp b/src/mongo/s/sharding_router_test_fixture.cpp index 264bd25240b..cc4fc863246 100644 --- a/src/mongo/s/sharding_router_test_fixture.cpp +++ b/src/mongo/s/sharding_router_test_fixture.cpp @@ -99,7 +99,7 @@ ShardingTestFixture::ShardingTestFixture() { // Configure the service context service->setFastClockSource(stdx::make_unique<ClockSourceMock>()); service->setPreciseClockSource(stdx::make_unique<ClockSourceMock>()); - service->setTickSource(stdx::make_unique<TickSourceMock>()); + service->setTickSource(stdx::make_unique<TickSourceMock<>>()); CollatorFactoryInterface::set(service, stdx::make_unique<CollatorFactoryMock>()); _transportSession = transport::MockSession::create(nullptr); |