Class: RspecProfiling::Collectors::CSV

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_profiling/collectors/csv.rb

Constant Summary collapse

HEADERS =
%w{
  branch
  commit_hash
  seed
  date
  file
  line_number
  owner_tag
  description
  status
  exception
  time
  query_count
  query_time
  request_count
  request_time
  start_memory
  end_memory
}

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = RspecProfiling.config) ⇒ CSV

Returns a new instance of CSV.



38
39
40
41
42
# File 'lib/rspec_profiling/collectors/csv.rb', line 38

def initialize(config=RspecProfiling.config)
  config.csv_path ||= 'tmp/spec_benchmarks.csv'

  @config = config
end

Class Method Details

.installObject



26
27
28
# File 'lib/rspec_profiling/collectors/csv.rb', line 26

def self.install
  # no op
end

.resetObject



34
35
36
# File 'lib/rspec_profiling/collectors/csv.rb', line 34

def self.reset
  # no op
end

.uninstallObject



30
31
32
# File 'lib/rspec_profiling/collectors/csv.rb', line 30

def self.uninstall
  # no op
end

Instance Method Details

#insert(attributes) ⇒ Object



44
45
46
# File 'lib/rspec_profiling/collectors/csv.rb', line 44

def insert(attributes)
  output << static_cells(attributes) + event_cells(attributes)
end