Class: Xcprofiler::AbstractReporter

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

Constant Summary collapse

DEFAULT_TRUNCATE_AT =
150

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ AbstractReporter

Returns a new instance of AbstractReporter.



7
8
9
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 7

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



15
16
17
18
19
20
21
22
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 15

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

#report!(executions) ⇒ Object

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 11

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