Class: Test::Unit::Util::MemoryUsage

Inherits:
Object
  • Object
show all
Defined in:
lib/test/unit/util/memory-usage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemoryUsage

Returns a new instance of MemoryUsage



7
8
9
10
11
# File 'lib/test/unit/util/memory-usage.rb', line 7

def initialize
  @virtual = nil
  @physical = nil
  collect_data
end

Instance Attribute Details

#physicalObject (readonly)

Returns the value of attribute physical.



6
7
8
# File 'lib/test/unit/util/memory-usage.rb', line 6

def physical
  @physical
end

#virtualObject (readonly)

Returns the value of attribute virtual.



5
6
7
# File 'lib/test/unit/util/memory-usage.rb', line 5

def virtual
  @virtual
end

Instance Method Details

#collected?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
# File 'lib/test/unit/util/memory-usage.rb', line 13

def collected?
  return false if @virtual.nil?
  return false if @physical.nil?
  true
end