Method: Minitest::BenchSpec.bench_performance_constant
- Defined in:
- lib/minitest/benchmark.rb
.bench_performance_constant(name, threshold = 0.99, &work) ⇒ Object
Create a benchmark that verifies that the performance is constant.
describe "my class" do
bench_performance_constant "zoom_algorithm!" do |n|
@obj.zoom_algorithm!(n)
end
end
400 401 402 403 404 |
# File 'lib/minitest/benchmark.rb', line 400 def self.bench_performance_constant name, threshold = 0.99, &work bench name do assert_performance_constant threshold, &work end end |