move and slightly refactor benchmark rake task
This commit is contained in:
parent
10ee025647
commit
3239a449b9
15
Rakefile
15
Rakefile
|
@ -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 }
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue