Class: PigCI::Profiler::Memory

Inherits:
PigCI::Profiler show all
Defined in:
lib/pig_ci/profiler/memory.rb

Instance Attribute Summary

Attributes inherited from PigCI::Profiler

#historical_log_file, #i18n_key, #log_file

Instance Method Summary collapse

Methods inherited from PigCI::Profiler

#increment!, #initialize, #save!, #setup!

Constructor Details

This class inherits a constructor from PigCI::Profiler

Instance Method Details

#log_request!(request_key) ⇒ Object


8
9
10
11
# File 'lib/pig_ci/profiler/memory.rb', line 8

def log_request!(request_key)
  GC.enable
  super
end

#log_valueObject


13
14
15
# File 'lib/pig_ci/profiler/memory.rb', line 13

def log_value
  ::GetProcessMem.new.bytes
end

#reset!Object


4
5
6
# File 'lib/pig_ci/profiler/memory.rb', line 4

def reset!
  GC.disable
end