Class: HKeyPerfDataReader::ConvertedType::PerfObject

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/hkey_perf_data_converted_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_defsObject (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

#instancesObject (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

#nameObject (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_freqObject (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_namesObject



50
51
52
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 50

def instance_names
  @instances.map { |i| i.name }
end