diff options
author | Daniel Morilha <daniel.morilha@mongodb.com> | 2022-06-30 13:16:45 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-06-30 14:11:31 +0000 |
commit | fae8410364c1f02ee62e77076ef60b8ee418368f (patch) | |
tree | 9909ee46de6ef7822236a468bfff95a6e61385dd /src/mongo/db/clientcursor.cpp | |
parent | 50a8545e444e8bfc7e3892a1319515302b568739 (diff) | |
download | mongo-fae8410364c1f02ee62e77076ef60b8ee418368f.tar.gz |
SERVER-65987 ServerStatusMetric API refresh
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r-- | src/mongo/db/clientcursor.cpp | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp index 9c1be7e4fc2..f0082b28b0c 100644 --- a/src/mongo/db/clientcursor.cpp +++ b/src/mongo/db/clientcursor.cpp @@ -27,15 +27,12 @@ * it in the license file. */ -#include "mongo/platform/basic.h" - #include "mongo/db/clientcursor.h" #include <string> #include <time.h> #include <vector> -#include "mongo/base/counter.h" #include "mongo/db/audit.h" #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -62,24 +59,12 @@ namespace mongo { using std::string; using std::stringstream; -static Counter64 cursorStatsOpen; // gauge -static Counter64 cursorStatsOpenPinned; // gauge -static Counter64 cursorStatsOpenNoTimeout; // gauge -static Counter64 cursorStatsTimedOut; -static Counter64 cursorStatsTotalOpened; -static Counter64 cursorStatsMoreThanOneBatch; - -static ServerStatusMetricField<Counter64> dCursorStatsOpen("cursor.open.total", &cursorStatsOpen); -static ServerStatusMetricField<Counter64> dCursorStatsOpenPinned("cursor.open.pinned", - &cursorStatsOpenPinned); -static ServerStatusMetricField<Counter64> dCursorStatsOpenNoTimeout("cursor.open.noTimeout", - &cursorStatsOpenNoTimeout); -static ServerStatusMetricField<Counter64> dCursorStatusTimedout("cursor.timedOut", - &cursorStatsTimedOut); -static ServerStatusMetricField<Counter64> dCursorStatsTotalOpened("cursor.totalOpened", - &cursorStatsTotalOpened); -static ServerStatusMetricField<Counter64> dCursorStatsMoreThanOneBatch( - "cursor.moreThanOneBatch", &cursorStatsMoreThanOneBatch); +static CounterMetric cursorStatsOpen{"cursor.open.total"}; +static CounterMetric cursorStatsOpenPinned{"cursor.open.pinned"}; +static CounterMetric cursorStatsOpenNoTimeout{"cursor.open.noTimeout"}; +static CounterMetric cursorStatsTimedOut{"cursor.timedOut"}; +static CounterMetric cursorStatsTotalOpened{"cursor.totalOpened"}; +static CounterMetric cursorStatsMoreThanOneBatch{"cursor.moreThanOneBatch"}; ClientCursor::ClientCursor(ClientCursorParams params, CursorId cursorId, |