Class: HKeyPerfDataReader::ConvertedType::PerfCounter

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

Direct Known Subclasses

NullPerfCounter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(counter_def) ⇒ PerfCounter

Returns a new instance of PerfCounter.



102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 102

def initialize(counter_def)
  # https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc785636(v=ws.10)

  # https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.performancecountertype


  @name = counter_def.name
  @type = counter_def.counter_type

  # Raw value, which has not been calculated according to the counter type

  @value = 0

  # For example, a value of counter type: `RawBase`

  @base_value = 0
end

Instance Attribute Details

#base_valueObject

Returns the value of attribute base_value.



100
101
102
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 100

def base_value
  @base_value
end

#nameObject (readonly)

Returns the value of attribute name.



97
98
99
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 97

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



98
99
100
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 98

def type
  @type
end

#valueObject

Returns the value of attribute value.



99
100
101
# File 'lib/fluent/plugin/hkey_perf_data_converted_type.rb', line 99

def value
  @value
end