diff options
author | Luis Osta <luis.osta@mongodb.com> | 2021-10-01 19:58:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-01 20:24:42 +0000 |
commit | 16682cbb1eacfd5fc80d07582105938cd5cb5e91 (patch) | |
tree | 8cc00b6d6c8f1e9d44fb50d16fcda8636c838428 | |
parent | 161f11214312d0d2d7f6638ca6d67232f6a46ea4 (diff) | |
download | mongo-16682cbb1eacfd5fc80d07582105938cd5cb5e91.tar.gz |
SERVER-60388 Update ShardingWriteRouter GBenchmark to utilize registerClientObserver
-rw-r--r-- | src/mongo/db/s/sharding_write_router_bm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/sharding_write_router_bm.cpp b/src/mongo/db/s/sharding_write_router_bm.cpp index 86158480fc7..8d354b1198c 100644 --- a/src/mongo/db/s/sharding_write_router_bm.cpp +++ b/src/mongo/db/s/sharding_write_router_bm.cpp @@ -33,6 +33,7 @@ #include "mongo/db/service_context.h" #include "mongo/platform/basic.h" +#include "mongo/db/concurrency/locker_noop_client_observer.h" #include "mongo/db/s/collection_sharding_runtime.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/catalog_cache_loader_mock.h" @@ -177,6 +178,7 @@ static void BM_InsertGetDestinedRecipient(benchmark::State& state) { auto serviceContext = ServiceContext::make(); const auto client = serviceContext->makeClient("test"); + serviceContext->registerClientObserver(std::make_unique<LockerNoopClientObserver>()); const auto opCtx = client->makeOperationContext(); const auto catalogCache = createCatalogCacheMock(opCtx.get()); @@ -196,6 +198,7 @@ static void BM_UpdateGetDestinedRecipient(benchmark::State& state) { auto serviceContext = ServiceContext::make(); const auto client = serviceContext->makeClient("test"); + serviceContext->registerClientObserver(std::make_unique<LockerNoopClientObserver>()); const auto opCtx = client->makeOperationContext(); const auto catalogCache = createCatalogCacheMock(opCtx.get()); @@ -213,6 +216,7 @@ static void BM_UnshardedDestinedRecipient(benchmark::State& state) { auto serviceContext = ServiceContext::make(); const auto client = serviceContext->makeClient("test"); + serviceContext->registerClientObserver(std::make_unique<LockerNoopClientObserver>()); const auto opCtx = client->makeOperationContext(); const auto catalogCache = CatalogCacheMock::make(); |