sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Minitest::Benchmark#assert_performance
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 |n|
@obj.algorithm(n)
end
endEdit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/minitest-5.18.1/lib/minitest/benchmark.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Minitest--Benchmark-assert_performance-for-pr
# Commit to gitgit add app/server/ruby/vendor/minitest-5.18.1/lib/minitest/benchmark.rbgit commit -m "better docs for Minitest::Benchmark#assert_performance"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Minitest--Benchmark-assert_performance-for-pr
hub pull-request
# Celebrate!