summaryrefslogtreecommitdiff
path: root/src/mongo/db/stats/timer_stats.h
diff options
context:
space:
mode:
authorMartin Bligh <mbligh@mongodb.com>2015-08-27 17:45:54 -0400
committerMartin Bligh <mbligh@mongodb.com>2015-08-27 17:45:54 -0400
commitc9d635404d514336a5f6ca50bf0a13f385e92bfc (patch)
treed514a2e9afe718057e4e8338e64aa61f885cf3d4 /src/mongo/db/stats/timer_stats.h
parente8f3ef4844210a474f24cb5038403917d518f554 (diff)
downloadmongo-c9d635404d514336a5f6ca50bf0a13f385e92bfc.tar.gz
SERVER-20167: use atomics for TimerStats
Diffstat (limited to 'src/mongo/db/stats/timer_stats.h')
-rw-r--r--src/mongo/db/stats/timer_stats.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/stats/timer_stats.h b/src/mongo/db/stats/timer_stats.h
index cd444bee9aa..6873cab5afc 100644
--- a/src/mongo/db/stats/timer_stats.h
+++ b/src/mongo/db/stats/timer_stats.h
@@ -30,7 +30,6 @@
#pragma once
#include "mongo/db/jsobj.h"
-#include "mongo/util/concurrency/spin_lock.h"
#include "mongo/util/timer.h"
namespace mongo {
@@ -56,9 +55,8 @@ public:
}
private:
- mutable SpinLock _lock;
- long long _num = 0;
- long long _totalMillis = 0;
+ AtomicUInt64 _num;
+ AtomicUInt64 _totalMillis;
};
/**