Class: Whysoslow::MemoryProfile::Snapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/whysoslow/memory_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label, divider) ⇒ Snapshot

Returns a new instance of Snapshot.



27
28
29
30
# File 'lib/whysoslow/memory_profile.rb', line 27

def initialize(label, divider)
  @label = label
  @memory = capture_memory_usage(divider)
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



25
26
27
# File 'lib/whysoslow/memory_profile.rb', line 25

def label
  @label
end

#memoryObject (readonly)

Returns the value of attribute memory.



25
26
27
# File 'lib/whysoslow/memory_profile.rb', line 25

def memory
  @memory
end