Class: Atatus::Metrics::CpuMemSet Private

Inherits:
Set
  • Object
show all
Includes:
Logging
Defined in:
lib/atatus/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.

Defined Under Namespace

Classes: Linux, Sample

Constant Summary

Constants included from Logging

Logging::LEVELS, Logging::PREFIX

Constants inherited from Set

Set::DISTINCT_LABEL_LIMIT

Instance Attribute Summary collapse

Attributes inherited from Set

#metrics

Instance Method Summary collapse

Methods included from Logging

#debug, #error, #fatal, #info, #warn

Methods inherited from Set

#counter, #disable!, #disabled?, #gauge, #metric, #timer

Constructor Details

#initialize(config) ⇒ CpuMemSet

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 CpuMemSet.



62
63
64
65
66
67
# File 'lib/atatus/metrics/cpu_mem_set.rb', line 62

def initialize(config)
  super

  @sampler = sampler_for_os(Metrics.os)
  read! # set initial values to calculate deltas from
end

Instance Attribute Details

#configObject (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.



69
70
71
# File 'lib/atatus/metrics/cpu_mem_set.rb', line 69

def config
  @config
end

Instance Method Details

#collectObject

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.



71
72
73
74
# File 'lib/atatus/metrics/cpu_mem_set.rb', line 71

def collect
  read!
  super
end