Module: Benchmark::IPS::Stats::StatsMetric
Instance Method Summary collapse
-
#error_percentage ⇒ Float
Return entry’s standard deviation of iteration per second in percentage.
- #overlaps?(baseline) ⇒ Boolean
Instance Method Details
#error_percentage ⇒ Float
Return entry’s standard deviation of iteration per second in percentage.
7 8 9 |
# File 'lib/benchmark/ips/stats/stats_metric.rb', line 7 def error_percentage 100.0 * (error.to_f / central_tendency) end |
#overlaps?(baseline) ⇒ Boolean
11 12 13 14 15 16 17 |
# File 'lib/benchmark/ips/stats/stats_metric.rb', line 11 def overlaps?(baseline) baseline_low = baseline.central_tendency - baseline.error baseline_high = baseline.central_tendency + baseline.error my_high = central_tendency + error my_low = central_tendency - error my_high > baseline_low && my_low < baseline_high end |