Skip to content
Browse files

Brought bench specs back to readme.

[git-p4: depot-paths = "//src/minitest/dev/": change = 8453]
  • Loading branch information...
1 parent 9a57c52 commit 2e06cd4a59c66b5f2a2974220d5eaf7f412f06fa @zenspider zenspider committed
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.txt
View
15 README.txt
@@ -152,6 +152,21 @@ Add benchmarks to your tests.
end
end
+Or add them to your specs. If you make benchmarks optional, you'll
+need to wrap your benchmarks in a conditional since the methods won't
+be defined. In minitest 5, the describe name needs to match
+/Bench(mark)?$/.
+
+ describe "Meme Benchmark" do
+ if ENV["BENCH"] then
+ bench_performance_linear "my_algorithm", 0.9999 do |n|
+ 100.times do
+ @obj.my_algorithm(n)
+ end
+ end
+ end
+ end
+
outputs something like:
# Running benchmarks:

0 comments on commit 2e06cd4

Please sign in to comment.
Something went wrong with that request. Please try again.