Class: RspecProfiling::Collectors::JSON
- Inherits:
-
Object
- Object
- RspecProfiling::Collectors::JSON
- Defined in:
- lib/rspec_profiling/collectors/json.rb
Constant Summary collapse
- KEYS =
%w{ branch commit_hash seed date file line_number description status exception time query_count query_time request_count request_time start_memory end_memory }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config = RspecProfiling.config) ⇒ JSON
constructor
A new instance of JSON.
- #insert(attributes) ⇒ Object
Constructor Details
#initialize(config = RspecProfiling.config) ⇒ JSON
Returns a new instance of JSON.
35 36 37 38 39 |
# File 'lib/rspec_profiling/collectors/json.rb', line 35 def initialize(config=RspecProfiling.config) config.output_file_path ||= 'tmp/spec_benchmarks.json' @config = config end |
Class Method Details
.install ⇒ Object
23 24 25 |
# File 'lib/rspec_profiling/collectors/json.rb', line 23 def self.install # no op end |
.reset ⇒ Object
31 32 33 |
# File 'lib/rspec_profiling/collectors/json.rb', line 31 def self.reset # no op end |
.uninstall ⇒ Object
27 28 29 |
# File 'lib/rspec_profiling/collectors/json.rb', line 27 def self.uninstall # no op end |
Instance Method Details
#insert(attributes) ⇒ Object
41 42 43 |
# File 'lib/rspec_profiling/collectors/json.rb', line 41 def insert(attributes) output << merge_attributes_and_events(attributes) + "\n" end |