Class: Test::Unit::Util::MemoryUsage
- Inherits:
-
Object
- Object
- Test::Unit::Util::MemoryUsage
- Defined in:
- lib/test/unit/util/memory-usage.rb
Instance Attribute Summary collapse
-
#physical ⇒ Object
readonly
Returns the value of attribute physical.
-
#virtual ⇒ Object
readonly
Returns the value of attribute virtual.
Instance Method Summary collapse
- #collected? ⇒ Boolean
-
#initialize ⇒ MemoryUsage
constructor
A new instance of MemoryUsage.
Constructor Details
#initialize ⇒ MemoryUsage
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
#physical ⇒ Object (readonly)
Returns the value of attribute physical.
6 7 8 |
# File 'lib/test/unit/util/memory-usage.rb', line 6 def physical @physical end |
#virtual ⇒ Object (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
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 |