Class: Evilution::Result::MemoryStats Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/result/memory_stats.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(child_rss_kb: nil, memory_delta_kb: nil, parent_rss_kb: nil) ⇒ MemoryStats

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MemoryStats.



14
15
16
17
18
19
# File 'lib/evilution/result/memory_stats.rb', line 14

def initialize(child_rss_kb: nil, memory_delta_kb: nil, parent_rss_kb: nil)
  @child_rss_kb = child_rss_kb
  @memory_delta_kb = memory_delta_kb
  @parent_rss_kb = parent_rss_kb
  freeze
end

Instance Attribute Details

#child_rss_kbObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/evilution/result/memory_stats.rb', line 6

def child_rss_kb
  @child_rss_kb
end

#memory_delta_kbObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/evilution/result/memory_stats.rb', line 6

def memory_delta_kb
  @memory_delta_kb
end

#parent_rss_kbObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



6
7
8
# File 'lib/evilution/result/memory_stats.rb', line 6

def parent_rss_kb
  @parent_rss_kb
end

Class Method Details

.from_fields(child_rss_kb: nil, memory_delta_kb: nil, parent_rss_kb: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
# File 'lib/evilution/result/memory_stats.rb', line 8

def self.from_fields(child_rss_kb: nil, memory_delta_kb: nil, parent_rss_kb: nil)
  return nil if child_rss_kb.nil? && memory_delta_kb.nil? && parent_rss_kb.nil?

  new(child_rss_kb: child_rss_kb, memory_delta_kb: memory_delta_kb, parent_rss_kb: parent_rss_kb)
end