summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop.h
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2016-04-05 09:33:23 -0400
committerJames Wahlin <james.wahlin@10gen.com>2016-04-21 11:45:40 -0400
commit6bbaee174447ee1c9177c72bdd07f050ab07e901 (patch)
tree213a1b76b23f31c143fb8ac4f3299fb1e13fc8a9 /src/mongo/db/curop.h
parent223c2a1aa5fd11fd3e7115ca9acb6d1217f80f92 (diff)
downloadmongo-6bbaee174447ee1c9177c72bdd07f050ab07e901.tar.gz
SERVER-23271 Add keysInserted and keysDeleted metrics for CRUD ops
Diffstat (limited to 'src/mongo/db/curop.h')
-rw-r--r--src/mongo/db/curop.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h
index 06539aeaacd..9d98191a0b5 100644
--- a/src/mongo/db/curop.h
+++ b/src/mongo/db/curop.h
@@ -184,15 +184,20 @@ public:
long long nMatched{-1}; // number of records that match the query
long long nModified{-1}; // number of records written (no no-ops)
- long long nmoved{-1}; // updates resulted in a move (moves are expensive)
long long ninserted{-1};
long long ndeleted{-1};
bool fastmod{false};
bool fastmodinsert{false}; // upsert of an $operation. builds a default object
bool upsert{false}; // true if the update actually did an insert
bool cursorExhausted{
- false}; // true if the cursor has been closed at end a find/getMore operation
- int keyUpdates{-1};
+ false}; // true if the cursor has been closed at end a find/getMore operation
+ int keyUpdates{-1}; // TODO SERVER-23272: Remove this metric.
+
+ // The following metrics are initialized with 0 rather than -1 in order to simplify use by the
+ // CRUD path.
+ long long nmoved{0}; // updates resulted in a move (moves are expensive)
+ long long keysInserted{0}; // Number of index keys inserted.
+ long long keysDeleted{0}; // Number of index keys removed.
long long writeConflicts{0};
// New Query Framework debugging/profiling info