Class: Gitlab::RSpecMetricsExporter::Formatter
- Inherits:
-
RSpec::Core::Formatters::BaseFormatter
- Object
- RSpec::Core::Formatters::BaseFormatter
- Gitlab::RSpecMetricsExporter::Formatter
- Defined in:
- lib/gitlab/rspec_metrics_exporter/formatter.rb
Constant Summary collapse
- LOG_PREFIX =
"[MetricsExporter]"
Instance Method Summary collapse
Instance Method Details
#stop(notification) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/gitlab/rspec_metrics_exporter/formatter.rb', line 16 def stop(notification) logger.debug("#{LOG_PREFIX} Starting test metrics export") data = notification.examples.filter_map do |example| next if config.skip_record_proc.call(example) TestMetrics.new(example, time).data end return logger.warn("#{LOG_PREFIX} No test execution records found, metrics will not be exported!") if data.empty? push_to_observer(data) end |