Module: TestProf::FactoryProf::Printers::NateHeckler
- Extended by:
- Logging
- Defined in:
- lib/test_prof/factory_prof/printers/nate_heckler.rb
Overview
Constant Summary
Constants included from Logging
Class Method Summary collapse
Methods included from Logging
Class Method Details
.dump(result, start_time:) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/test_prof/factory_prof/printers/nate_heckler.rb', line 13 def dump(result, start_time:, **) return if result.raw_stats == {} total_time = result.stats.sum { |stat| stat[:top_level_time] } total_run_time = TestProf.now - start_time percentage = ((total_time / total_run_time) * 100).round(2) log :info, "Time spent in factories: #{total_time.duration} (#{percentage}% of total time)" end |