Module: TestProf::Autopilot::EventProf::Printer
- Defined in:
- lib/test_prof/autopilot/event_prof/printer.rb
Overview
Module is used for printing :event_prof report
Class Method Summary collapse
Class Method Details
.print_report(report) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/test_prof/autopilot/event_prof/printer.rb', line 16 def print_report(report) result = report.raw_report msgs = [] msgs << <<~MSG EventProf results for #{result["event"]} Total time: #{result["total_time"].duration} of #{result["absolute_run_time"].duration} (#{result["time_percentage"]}%) Total events: #{result["total_count"]} Top #{result["top_count"]} slowest suites (by #{result["rank_by"]}): MSG result["groups"].each do |group| msgs << <<~GROUP #{group["description"].truncate} (#{group["location"]}) – #{group["time"].duration} (#{group["count"]} / #{group["examples"]}) of #{group["run_time"].duration} (#{group["time_percentage"]}%) GROUP end Logging.log msgs.join end |