Class: Xcprofiler::AbstractReporter

Inherits:
Object
  • Object
show all
Defined in:
lib/xcprofiler/reporters/abstract_reporter.rb

Direct Known Subclasses

JSONReporter, StandardOutputReporter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AbstractReporter

Returns a new instance of AbstractReporter.



5
6
7
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 5

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 3

def options
  @options
end

Instance Method Details

#filter_executions(executions) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 13

def filter_executions(executions)
  executions = sort_executions(executions, order)
  executions = executions.delete_if(&:invalid?) unless show_invalid_locations?
  executions = executions.delete_if { |v| v.time < threshold } if threshold
  executions = executions[0...limit] if limit
  executions
end

#report!(executions) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 9

def report!(executions)
  raise NotImplementedError, 'Not implemented'
end