diff options
author | Martin Bligh <mbligh@mongodb.com> | 2015-08-27 17:45:54 -0400 |
---|---|---|
committer | Martin Bligh <mbligh@mongodb.com> | 2015-08-27 17:45:54 -0400 |
commit | c9d635404d514336a5f6ca50bf0a13f385e92bfc (patch) | |
tree | d514a2e9afe718057e4e8338e64aa61f885cf3d4 /src/mongo/db/stats/timer_stats.h | |
parent | e8f3ef4844210a474f24cb5038403917d518f554 (diff) | |
download | mongo-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.h | 6 |
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; }; /** |