method
assert_performance
v1_9_3_392 -
Show latest stable
- Class:
MiniTest::Unit::TestCase
assert_performance(validation, &work)public
Runs the given work, gathering the times of each run. Range and times are then passed to a given validation proc. Outputs the benchmark name and times in tab-separated format, making it easy to paste into a spreadsheet for graphing or further analysis.
Ranges are specified by ::bench_range.
Eg:
def bench_algorithm validation = proc { |x, y| ... } assert_performance validation do |x| @obj.algorithm end end