head     1.1;
branch   1.1.1;
access   ;
symbols  Initial:1.1.1.1 ditto:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2005.05.01.10.53.29;  author ditto;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2005.05.01.10.53.29;  author ditto;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#!c:/ruby/bin/ruby

if ARGV.empty?
  puts "Usage: benchmarker times 'Person.expensive_way' 'Person.another_expensive_way' ..."
  exit 
end

require File.dirname(__FILE__) + '/../config/environment'
require 'benchmark'
include Benchmark

# Don't include compilation in the benchmark
ARGV[1..-1].each { |expression| eval(expression) }

bm(6) do |x|
  ARGV[1..-1].each_with_index do |expression, idx|
    x.report("##{idx + 1}") { ARGV[0].to_i.times { eval(expression) } }
  end
end @


1.1.1.1
log
@Initial import
@
text
@@
