I'm working on rake tasks for a large .net solution (using the albacore gem) and I want to be able to record to a file start and stop times for any rake tasks that run to try and speed up our build and locate bottlenecks. Is there anything built in that I can use, or do I need to write something?
There is a simple benchmarking library in Ruby's Stdlib:
require 'benchmark'
puts Benchmark.measure { "a"*1_000_000 }
You could drop that in your rake tasks, as for an automatic "benchmark all rake task executions", that would take a little digging into the innards of rake.
More info at: http://ruby-doc.org/stdlib/libdoc/benchmark/rdoc/index.html
Ended up writing this: rake-performance
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With