Use example_runtime instead of total runtime

This fixes the issue where < 10 examples in profile showed less than 
100% total time.
This commit is contained in:
Michael Miller 2019-03-25 16:31:01 -06:00
parent 72aa72781a
commit 34b0399654

View file

@ -36,7 +36,7 @@ module Spectator
results = report.compact_map(&.as?(FinishedResult)) results = report.compact_map(&.as?(FinishedResult))
sorted_results = results.sort_by(&.elapsed) sorted_results = results.sort_by(&.elapsed)
slowest = sorted_results.last(size).reverse slowest = sorted_results.last(size).reverse
self.new(slowest, report.runtime) self.new(slowest, report.example_runtime)
end end
end end
end end