Class: RSpec::Statsd::Formatter

Inherits:
Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/rspec-statsd/formatter.rb

Instance Method Summary collapse

Instance Method Details

#dump_summary(duration, example_count, failure_count, pending_count) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/rspec-statsd/formatter.rb', line 6

def dump_summary(duration, example_count, failure_count, pending_count)
  result = failure_count == 0 ? "success" : "failure"

  client.gauge("#{metric}.duration", duration)
  client.increment("#{metric}.count")
  client.gauge("#{metric}.#{result}.duration", duration)
  client.increment("#{metric}.#{result}.count")
end