Sha256: 2a47a13e48e066daa88c159fefe7ec3e5f893c6239d8d3dc0e44cb192a206746

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

module Benchmark
  module IPS
    module Stats
      
      class SD
        
        def initialize(samples)
          @mean = Timing.mean(samples)
          @error = Timing.stddev(samples, @mean).round
        end
        
        def central_tendency
          @mean
        end
        
        def error
          @error
        end

        def slowdown(baseline)
          slowdown = baseline.central_tendency.to_f / central_tendency
          [slowdown, nil]
        end

        def footer
          nil
        end
        
      end
    
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
benchmark-ips-2.7.2 lib/benchmark/ips/stats/sd.rb
benchmark-ips-2.7.1 lib/benchmark/ips/stats/sd.rb