Class: LogStash::Instrument::PeriodicPoller::Cgroup::CpuResource
- Inherits:
-
Object
- Object
- LogStash::Instrument::PeriodicPoller::Cgroup::CpuResource
- Includes:
- ControllerResource, Util::Loggable
- Defined in:
- lib/logstash/instrument/periodic_poller/cgroup.rb
Instance Attribute Summary
Attributes included from ControllerResource
#base_path, #offset_path, #override
Instance Method Summary collapse
-
#initialize(original_path) ⇒ CpuResource
constructor
A new instance of CpuResource.
- #to_hash ⇒ Object
Methods included from ControllerResource
Constructor Details
#initialize(original_path) ⇒ CpuResource
Returns a new instance of CpuResource.
125 126 127 |
# File 'lib/logstash/instrument/periodic_poller/cgroup.rb', line 125 def initialize(original_path) common_initialize(CPU_DIR, "ls.cgroup.cpu.path.override", original_path) end |
Instance Method Details
#to_hash ⇒ Object
128 129 130 131 132 133 134 135 |
# File 'lib/logstash/instrument/periodic_poller/cgroup.rb', line 128 def to_hash { :control_group => offset_path, :cfs_period_micros => cfs_period_us, :cfs_quota_micros => cfs_quota_us, :stat => build_cpu_stats_hash } end |