Sha256: 21162801bade512294cf6bd3e7fe616b57d11404a5b6d048ec4d9825bddf7935
Contents?: true
Size: 507 Bytes
Versions: 3
Compression:
Stored size: 507 Bytes
Contents
module Minitest class StatsReporter < AbstractReporter def initialize _options @results = [] end def start @current_time = Time.now end def record result @results << result end def report slowest = @results.sort_by(&:time).reverse.first(10) slowest.each do |result| puts format('%10.4f %s', result.time, result.location) end end end def self.plugin_stats_init options reporter << StatsReporter.new(options) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gir_ffi-0.7.10 | test/minitest/stats_plugin.rb |
gir_ffi-0.7.9 | test/minitest/stats_plugin.rb |
gir_ffi-0.7.8 | test/minitest/stats_plugin.rb |