diff options
author | Nathan Louie <nathan.louie@10gen.com> | 2018-06-11 10:58:56 -0400 |
---|---|---|
committer | Nathan Louie <nathan.louie@10gen.com> | 2018-06-15 11:32:07 -0400 |
commit | 76398baf84773e0e5766eb2e9d53d290933806fd (patch) | |
tree | f6da6dc0ec36880b7346e1009178c639a38f8cb5 /src/mongo/db/server_transactions_metrics.h | |
parent | 3bec524a983f2a21bfd40b1d39c937189e12db07 (diff) | |
download | mongo-76398baf84773e0e5766eb2e9d53d290933806fd.tar.gz |
SERVER-35147 Track total number of committed and aborted transactions in
ServerTransactionsMetrics
Diffstat (limited to 'src/mongo/db/server_transactions_metrics.h')
-rw-r--r-- | src/mongo/db/server_transactions_metrics.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/server_transactions_metrics.h b/src/mongo/db/server_transactions_metrics.h index 6d934d110aa..a9e2490cf88 100644 --- a/src/mongo/db/server_transactions_metrics.h +++ b/src/mongo/db/server_transactions_metrics.h @@ -49,6 +49,12 @@ public: unsigned long long getTotalStarted() const; void incrementTotalStarted(); + unsigned long long getTotalAborted() const; + void incrementTotalAborted(); + + unsigned long long getTotalCommitted() const; + void incrementTotalCommitted(); + /** * Appends the accumulated stats to a transactions stats object. */ @@ -57,6 +63,12 @@ public: private: // The total number of multi-document transactions started since the last server startup. AtomicUInt64 _totalStarted{0}; + + // The total number of multi-document transaction aborts. + AtomicUInt64 _totalAborted{0}; + + // The total number of multi-document transaction commits. + AtomicUInt64 _totalCommitted{0}; }; } // namespace mongo |