Class: RspecProfiling::Collectors::CSV
- Inherits:
-
Object
- Object
- RspecProfiling::Collectors::CSV
- Defined in:
- lib/rspec_profiling/collectors/csv.rb
Constant Summary collapse
- HEADERS =
%w{ commit date file line_number description status exception time query_count query_time request_count request_time }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ CSV
constructor
A new instance of CSV.
- #insert(attributes) ⇒ Object
Constructor Details
#initialize ⇒ CSV
Returns a new instance of CSV.
33 34 35 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 33 def initialize RspecProfiling.config.csv_path ||= 'tmp/spec_benchmarks.csv' end |
Class Method Details
.install ⇒ Object
21 22 23 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 21 def self.install # no op end |
.reset ⇒ Object
29 30 31 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 29 def self.reset # no op end |
.uninstall ⇒ Object
25 26 27 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 25 def self.uninstall # no op end |
Instance Method Details
#insert(attributes) ⇒ Object
37 38 39 40 41 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 37 def insert(attributes) output << HEADERS.map do |field| attributes.fetch(field.to_sym) end end |