class RequestLogAnalyzer::Aggregator::Base

The base class of an aggregator. This class provides the interface to which every aggregator should comply (by simply subclassing this class).

Attributes

options[R]
source[R]

Public Class Methods

new(source, options = {}) click to toggle source

Intializes a new RequestLogAnalyzer::Aggregator::Base instance It will include the specific file format module.

   # File lib/request_log_analyzer/aggregator.rb
 9 def initialize(source, options = {})
10   @source = source
11   @options = options
12 end

Public Instance Methods

aggregate(_request) click to toggle source

The aggregate function is called for every request. Implement the aggregating functionality in this method

   # File lib/request_log_analyzer/aggregator.rb
21 def aggregate(_request)
22 end
finalize() click to toggle source

The finalize function is called after all sources are parsed and no more requests will be passed to the aggregator

   # File lib/request_log_analyzer/aggregator.rb
26 def finalize
27 end
prepare() click to toggle source

The prepare function is called just before parsing starts. This function can be used to initialie variables, etc.

   # File lib/request_log_analyzer/aggregator.rb
16 def prepare
17 end
report(_output) click to toggle source

The report function is called at the end. Implement any result reporting in this function.

   # File lib/request_log_analyzer/aggregator.rb
35 def report(_output)
36 end
source_change(_change, _filename) click to toggle source

The source_change function gets called when handling a source is started or finished.

   # File lib/request_log_analyzer/aggregator.rb
39 def source_change(_change, _filename)
40 end
warning(_type, _message, _lineno) click to toggle source

The warning method is called if the parser eits a warning.

   # File lib/request_log_analyzer/aggregator.rb
30 def warning(_type, _message, _lineno)
31 end