Tuesday, November 27, 2007

New Merb Benchmarks

A while ago I started to do some really simple benchmarks on Merb and Rails. Yehuda Katz, aka wycats on IRC went and wrote two simple benchmark apps that live in Merbs SVN. To get these:
svn co http://svn.devjavu.com/merb/apps/benchmark 

svn co http://svn.devjavu.com/merb/apps/rails_benchmark
Both of these will use evented mongrel and swiftiply if they're installed.

To use these benchmark apps change into the root directory.
ruby script/benchmark
That command will run all the available benchmarks.

There are a number of options. Use the -h flag to help you find your way around. The options are there to help you setup the benchmark and also to select which benchmarks to run.
ruby script/benchmark -l
will list all the benchmarks available.
ruby script/benchmark -s erb,haml
will run the template and partials for erb templates and haml templates only.

Be careful though, these can take a while. Especially on Rails.