diff options
author | Janna Golden <janna.golden@mongodb.com> | 2019-12-17 16:41:48 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-12-17 16:41:48 +0000 |
commit | 1fe9dfb1ade548488831bf29cdcc57636e5e3b8a (patch) | |
tree | 0e005b396049b1c246b73cde868dba1dac9582cc /src/mongo/s/sharding_router_test_fixture.cpp | |
parent | 726a916f2e0072169878dd36efd0cd5d6964e12e (diff) | |
download | mongo-1fe9dfb1ade548488831bf29cdcc57636e5e3b8a.tar.gz |
SERVER-43617 Add metrics on the mongos to indicate the number of shards targeted for CRUD and agg commands
Diffstat (limited to 'src/mongo/s/sharding_router_test_fixture.cpp')
-rw-r--r-- | src/mongo/s/sharding_router_test_fixture.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/s/sharding_router_test_fixture.cpp b/src/mongo/s/sharding_router_test_fixture.cpp index 075a472c25b..2db8035dc6e 100644 --- a/src/mongo/s/sharding_router_test_fixture.cpp +++ b/src/mongo/s/sharding_router_test_fixture.cpp @@ -59,6 +59,7 @@ #include "mongo/s/catalog/type_collection.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/catalog_cache.h" +#include "mongo/s/client/num_hosts_targeted_metrics.h" #include "mongo/s/client/shard_factory.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/client/shard_remote.h" @@ -140,6 +141,8 @@ ShardingTestFixture::ShardingTestFixture() { std::make_unique<ShardingCatalogClientImpl>(std::move(uniqueDistLockManager))); catalogClient->startup(); + NumHostsTargetedMetrics::get(service).startup(); + ConnectionString configCS = ConnectionString::forReplicaSet( "configRS", {HostAndPort{"TestHost1"}, HostAndPort{"TestHost2"}}); |