Class: GitLab::Monitor::MemStats::Aggregator
- Inherits:
-
Object
- Object
- GitLab::Monitor::MemStats::Aggregator
- Defined in:
- lib/gitlab_monitor/memstats.rb
Overview
Aggregates all metrics for a single PID in /proc/<pid>/smaps
Instance Attribute Summary collapse
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#totals ⇒ Object
Returns the value of attribute totals.
Instance Method Summary collapse
-
#initialize(pid) ⇒ Aggregator
constructor
A new instance of Aggregator.
- #valid? ⇒ Boolean
Constructor Details
#initialize(pid) ⇒ Aggregator
Returns a new instance of Aggregator.
35 36 37 38 39 40 41 42 |
# File 'lib/gitlab_monitor/memstats.rb', line 35 def initialize(pid) @pid = pid @totals = Hash.new(0) @mappings = [] @valid = true populate_info end |
Instance Attribute Details
#pid ⇒ Object
Returns the value of attribute pid.
33 34 35 |
# File 'lib/gitlab_monitor/memstats.rb', line 33 def pid @pid end |
#totals ⇒ Object
Returns the value of attribute totals.
33 34 35 |
# File 'lib/gitlab_monitor/memstats.rb', line 33 def totals @totals end |
Instance Method Details
#valid? ⇒ Boolean
44 45 46 |
# File 'lib/gitlab_monitor/memstats.rb', line 44 def valid? @valid end |