Class: Daemonizer::Stats::MemoryStats::Process

Inherits:
Object
  • Object
show all
Defined in:
lib/daemonizer/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



110
111
112
# File 'lib/daemonizer/stats.rb', line 110

def name
  @name
end

#pidObject

Returns the value of attribute pid.



105
106
107
# File 'lib/daemonizer/stats.rb', line 105

def pid
  @pid
end

#ppidObject

Returns the value of attribute ppid.



106
107
108
# File 'lib/daemonizer/stats.rb', line 106

def ppid
  @ppid
end

#private_dirty_rssObject

in KB



111
112
113
# File 'lib/daemonizer/stats.rb', line 111

def private_dirty_rss
  @private_dirty_rss
end

#rssObject

in KB



109
110
111
# File 'lib/daemonizer/stats.rb', line 109

def rss
  @rss
end

#threadsObject

Returns the value of attribute threads.



107
108
109
# File 'lib/daemonizer/stats.rb', line 107

def threads
  @threads
end

#vm_sizeObject

in KB



108
109
110
# File 'lib/daemonizer/stats.rb', line 108

def vm_size
  @vm_size
end

Instance Method Details

#private_dirty_rss_in_mbObject



121
122
123
124
125
126
127
# File 'lib/daemonizer/stats.rb', line 121

def private_dirty_rss_in_mb
	if private_dirty_rss.is_a?(Numeric)
		return sprintf("%.1f MB", private_dirty_rss / 1024.0)
	else
		return "?"
	end
end

#rss_in_mbObject



117
118
119
# File 'lib/daemonizer/stats.rb', line 117

def rss_in_mb
	return sprintf("%.1f MB", rss / 1024.0)
end

#to_aObject



129
130
131
# File 'lib/daemonizer/stats.rb', line 129

def to_a
	return [pid, ppid, vm_size_in_mb, private_dirty_rss_in_mb, rss_in_mb, name]
end

#vm_size_in_mbObject



113
114
115
# File 'lib/daemonizer/stats.rb', line 113

def vm_size_in_mb
	return sprintf("%.1f MB", vm_size / 1024.0)
end