Class: RspecProfiling::Collectors::CSV
- Inherits:
-
Object
- Object
- RspecProfiling::Collectors::CSV
- Defined in:
- lib/rspec_profiling/collectors/csv.rb
Constant Summary collapse
- HEADERS =
%w{ branch 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.
34 35 36 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 34 def initialize RspecProfiling.config.csv_path ||= 'tmp/spec_benchmarks.csv' end |
Class Method Details
.install ⇒ Object
22 23 24 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 22 def self.install # no op end |
.reset ⇒ Object
30 31 32 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 30 def self.reset # no op end |
.uninstall ⇒ Object
26 27 28 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 26 def self.uninstall # no op end |
Instance Method Details
#insert(attributes) ⇒ Object
38 39 40 41 42 |
# File 'lib/rspec_profiling/collectors/csv.rb', line 38 def insert(attributes) output << HEADERS.map do |field| attributes.fetch(field.to_sym) end end |