diff options
author | Nathan Louie <nathan.louie@10gen.com> | 2018-06-18 10:53:36 -0400 |
---|---|---|
committer | Nathan Louie <nathan.louie@10gen.com> | 2018-06-25 17:21:30 -0400 |
commit | d28c9472878a9e50196c568848c84d6225036406 (patch) | |
tree | 57b4cf43c5490aea132c4f77e0da5a406f334f28 /src/mongo/db/server_transactions_metrics.cpp | |
parent | cec7de9fdbfafbbae19ff8fc3194a5573ab6b744 (diff) | |
download | mongo-d28c9472878a9e50196c568848c84d6225036406.tar.gz |
added to class
Diffstat (limited to 'src/mongo/db/server_transactions_metrics.cpp')
-rw-r--r-- | src/mongo/db/server_transactions_metrics.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mongo/db/server_transactions_metrics.cpp b/src/mongo/db/server_transactions_metrics.cpp index 64411409672..5546f184b4e 100644 --- a/src/mongo/db/server_transactions_metrics.cpp +++ b/src/mongo/db/server_transactions_metrics.cpp @@ -51,6 +51,30 @@ ServerTransactionsMetrics* ServerTransactionsMetrics::get(OperationContext* opCt return get(opCtx->getServiceContext()); } +unsigned long long ServerTransactionsMetrics::getCurrentActive() const { + return _currentActive.load(); +} + +void ServerTransactionsMetrics::decrementCurrentActive() { + _currentActive.fetchAndSubtract(1); +} + +void ServerTransactionsMetrics::incrementCurrentActive() { + _currentActive.fetchAndAdd(1); +} + +unsigned long long ServerTransactionsMetrics::getCurrentInactive() const { + return _currentInactive.load(); +} + +void ServerTransactionsMetrics::decrementCurrentInactive() { + _currentInactive.fetchAndSubtract(1); +} + +void ServerTransactionsMetrics::incrementCurrentInactive() { + _currentInactive.fetchAndAdd(1); +} + unsigned long long ServerTransactionsMetrics::getCurrentOpen() const { return _currentOpen.load(); } |