Class: ElasticAPM::Metrics::CpuMemSet::Linux::ProcSelfStat Private
- Inherits:
-
Object
- Object
- ElasticAPM::Metrics::CpuMemSet::Linux::ProcSelfStat
- Defined in:
- lib/elastic_apm/metrics/cpu_mem_set.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
- #rss ⇒ Object readonly private
- #total ⇒ Object readonly private
- #vsize ⇒ Object readonly private
Instance Method Summary collapse
- #read! ⇒ Object private
Instance Attribute Details
#rss ⇒ Object (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.
199 200 201 |
# File 'lib/elastic_apm/metrics/cpu_mem_set.rb', line 199 def rss @rss end |
#total ⇒ Object (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.
199 200 201 |
# File 'lib/elastic_apm/metrics/cpu_mem_set.rb', line 199 def total @total end |
#vsize ⇒ Object (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.
199 200 201 |
# File 'lib/elastic_apm/metrics/cpu_mem_set.rb', line 199 def vsize @vsize end |
Instance Method Details
#read! ⇒ 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.
201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/elastic_apm/metrics/cpu_mem_set.rb', line 201 def read! stat = IO.readlines('/proc/self/stat') .lazy .first .split .map(&:to_i) @total = stat[UTIME_POS] + stat[STIME_POS] @vsize = stat[VSIZE_POS] @rss = stat[RSS_POS] self end |