summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_transactions_metrics.h
diff options
context:
space:
mode:
authorNathan Louie <nathan.louie@10gen.com>2018-06-11 10:58:56 -0400
committerNathan Louie <nathan.louie@10gen.com>2018-06-15 11:32:07 -0400
commit76398baf84773e0e5766eb2e9d53d290933806fd (patch)
treef6da6dc0ec36880b7346e1009178c639a38f8cb5 /src/mongo/db/server_transactions_metrics.h
parent3bec524a983f2a21bfd40b1d39c937189e12db07 (diff)
downloadmongo-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.h12
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