From 98b4a0a2b2c4a230efe1c2ddc3da487a575d670d Mon Sep 17 00:00:00 2001 From: Milena Ivanova Date: Fri, 28 May 2021 09:24:11 +0000 Subject: SERVER-56602 Track usage of match expressions in serverStatus --- src/mongo/db/curop.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mongo/db/curop.h') diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h index 8c3adec3a91..afb48de2440 100644 --- a/src/mongo/db/curop.h +++ b/src/mongo/db/curop.h @@ -775,6 +775,16 @@ public: _tickSource = tickSource; } + /** + * Merge match counters from the current operation into the global map and stop counting. + */ + void stopMatchExprCounter(); + + /** + * Increment the counter for the match expression with given name in the current operation. + */ + void incrementMatchExprCounter(StringData name); + private: class CurOpStack; @@ -846,4 +856,5 @@ private: TickSource* _tickSource = nullptr; }; + } // namespace mongo -- cgit v1.2.1