Class: HKeyPerfDataReader::CounterNameTableReader

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

Instance Method Summary collapse

Constructor Details

#initializeCounterNameTableReader

Returns a new instance of CounterNameTableReader.



285
286
287
# File 'lib/fluent/plugin/hkey_perf_data_reader.rb', line 285

def initialize
  @counter_name_table = nil
end

Instance Method Details

#read(index) ⇒ Object



289
290
291
292
293
294
295
296
# File 'lib/fluent/plugin/hkey_perf_data_reader.rb', line 289

def read(index)
  # In order to reduce the process in the initialization phase.
  if @counter_name_table.nil?
    @counter_name_table = CounterNameTableReader.build_table
  end

  @counter_name_table[index]
end