Use Concurrent::AtomicReference instead AtomicFixnum

This commit is contained in:
Oswaldo Ferreira 2017-12-26 17:23:12 -02:00
parent a5a0f3f725
commit 64c6a8ae6e
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ module Gitlab
# Class for tracking timing information about method calls
class MethodCall
@@measurement_enabled_cache = Concurrent::AtomicBoolean.new(false)
@@measurement_enabled_cache_expires_at = Concurrent::AtomicFixnum.new(Time.now.to_i)
@@measurement_enabled_cache_expires_at = Concurrent::AtomicReference.new(Time.now.to_i)
MUTEX = Mutex.new
BASE_LABELS = { module: nil, method: nil }.freeze
attr_reader :real_time, :cpu_time, :call_count, :labels