diff options
author | Amirsaman Memaripour <amirsaman.memaripour@mongodb.com> | 2021-02-08 17:08:48 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-02-09 01:16:35 +0000 |
commit | 4d72470b050c348ad5fae2cf46c01e09943f5070 (patch) | |
tree | 46b2365867a9e1d19a8d2162cab4e3e196c8d6b5 /src/mongo/db/s/resharding/resharding_metrics_test.cpp | |
parent | f9cc115ef03eef4e8a018585c73d0c86751217f7 (diff) | |
download | mongo-4d72470b050c348ad5fae2cf46c01e09943f5070.tar.gz |
SERVER-53842 Count the number of resharding attempts in resharding metrics
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_metrics_test.cpp')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_metrics_test.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/s/resharding/resharding_metrics_test.cpp b/src/mongo/db/s/resharding/resharding_metrics_test.cpp index 909634240f8..798e7c2a103 100644 --- a/src/mongo/db/s/resharding/resharding_metrics_test.cpp +++ b/src/mongo/db/s/resharding/resharding_metrics_test.cpp @@ -129,9 +129,14 @@ TEST_F(ReshardingMetricsTest, TestOperationStatus) { getMetrics()->onCompletion(ReshardingMetrics::OperationStatus::kCanceled); } - checkMetrics("successfulOperations", kNumSuccessfulOps); - checkMetrics("failedOperations", kNumFailedOps); - checkMetrics("canceledOperations", kNumCanceledOps); + checkMetrics("countReshardingSuccessful", kNumSuccessfulOps); + checkMetrics("countReshardingFailures", kNumFailedOps); + checkMetrics("countReshardingCanceled", kNumCanceledOps); + + const auto total = kNumSuccessfulOps + kNumFailedOps + kNumCanceledOps; + checkMetrics("countReshardingOperations", total); + getMetrics()->onStart(); + checkMetrics("countReshardingOperations", total + 1); } TEST_F(ReshardingMetricsTest, TestElapsedTime) { |