Method: MiniTest::Spec.bench_performance_exponential
- Defined in:
- lib/minitest/benchmark.rb
.bench_performance_exponential(name, threshold = 0.99, &work) ⇒ Object
Create a benchmark that verifies that the performance is exponential.
describe "my class" do
bench_performance_exponential "algorithm" do
@obj.algorithm
end
end
355 356 357 358 359 |
# File 'lib/minitest/benchmark.rb', line 355 def self.bench_performance_exponential name, threshold = 0.99, &work bench name do assert_performance_exponential threshold, &work end end |