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 << " EventProf results for \#{result[\"event\"]}\n\n Total time: \#{result[\"total_time\"].duration} of \#{result[\"absolute_run_time\"].duration} (\#{result[\"time_percentage\"]}%)\n Total events: \#{result[\"total_count\"]}\n\n Top \#{result[\"top_count\"]} slowest suites (by \#{result[\"rank_by\"]}):\n MSG\n\n result[\"groups\"].each do |group|\n msgs <<\n <<~GROUP\n \#{group[\"description\"].truncate} (\#{group[\"location\"]}) \u2013 \#{group[\"time\"].duration} (\#{group[\"count\"]} / \#{group[\"examples\"]}) of \#{group[\"run_time\"].duration} (\#{group[\"time_percentage\"]}%)\n GROUP\n end\n\n Logging.log msgs.join\nend\n" |