Class: HKeyPerfDataReader::ConvertedType::PerfObject
- Inherits:
-
Object
- Object
- HKeyPerfDataReader::ConvertedType::PerfObject
- Defined in:
- lib/fluent/plugin/hkey_perf_data_converted_type.rb
Instance Attribute Summary collapse
-
#counter_defs ⇒ Object
readonly
Returns the value of attribute counter_defs.
-
#instances ⇒ Object
readonly
Returns the value of attribute instances.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#perf_freq ⇒ Object
readonly
Returns the value of attribute perf_freq.
Instance Method Summary collapse
- #add_counter_def(counter_def) ⇒ Object
- #add_instance(perf_instance) ⇒ Object
-
#initialize(name, object_type) ⇒ PerfObject
constructor
A new instance of PerfObject.
- #instance_names ⇒ Object
Constructor Details
#initialize(name, object_type) ⇒ PerfObject
Returns a new instance of PerfObject.
43 44 45 46 47 48 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 43 def initialize(name, object_type) @name = name @instances = [] @counter_defs = [] @perf_freq = object_type.perfFreq end |
Instance Attribute Details
#counter_defs ⇒ Object (readonly)
Returns the value of attribute counter_defs.
40 41 42 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 40 def counter_defs @counter_defs end |
#instances ⇒ Object (readonly)
Returns the value of attribute instances.
39 40 41 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 39 def instances @instances end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
38 39 40 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 38 def name @name end |
#perf_freq ⇒ Object (readonly)
Returns the value of attribute perf_freq.
41 42 43 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 41 def perf_freq @perf_freq end |
Instance Method Details
#add_counter_def(counter_def) ⇒ Object
54 55 56 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 54 def add_counter_def(counter_def) @counter_defs.append(counter_def) end |
#add_instance(perf_instance) ⇒ Object
58 59 60 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 58 def add_instance(perf_instance) @instances.append(perf_instance) end |
#instance_names ⇒ Object
50 51 52 |
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 50 def instance_names @instances.map { |i| i.name } end |