Class: Xcprofiler::AbstractReporter
- Inherits:
-
Object
- Object
- Xcprofiler::AbstractReporter
- Defined in:
- lib/xcprofiler/reporters/abstract_reporter.rb
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_TRUNCATE_AT =
150
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #filter_executions(executions) ⇒ Object
-
#initialize(options = {}) ⇒ AbstractReporter
constructor
A new instance of AbstractReporter.
- #report!(executions) ⇒ Object
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 = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 3 def @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
11 12 13 |
# File 'lib/xcprofiler/reporters/abstract_reporter.rb', line 11 def report!(executions) raise NotImplementedError, 'Not implemented' end |