move and slightly refactor benchmark rake task

This commit is contained in:
Brian Lopez 2010-08-11 11:29:10 -07:00
parent 10ee025647
commit 3239a449b9
2 changed files with 9 additions and 14 deletions

View File

@ -36,18 +36,5 @@ end
task :default => :spec
def define_bench_task(feature)
desc "Run #{feature} benchmarks"
task(feature){ ruby "benchmark/#{feature}.rb" }
end
namespace :bench do
define_bench_task :active_record
define_bench_task :escape
define_bench_task :query_with_mysql_casting
define_bench_task :query_without_mysql_casting
define_bench_task :sequel
define_bench_task :allocations
define_bench_task :thread_alone
end# Load custom tasks
# Load custom tasks
Dir['tasks/*.rake'].sort.each { |f| load f }

8
tasks/benchmarks.rake Normal file
View File

@ -0,0 +1,8 @@
namespace :bench do
[ :active_record, :escape, :query_with_mysql_casting,
:query_without_mysql_casting, :sequel, :allocations,
:thread_alone].each do |feature|
desc "Run #{feature} benchmarks"
task(feature){ ruby "benchmark/#{feature}.rb" }
end
end