Permalink
Browse files

Fix a couple bench typos

  • Loading branch information...
1 parent 4314822 commit 4c5c99102bfdc543798ba7e62a46ef32ee42141b @nicksieger nicksieger committed Nov 29, 2009
Showing with 3 additions and 3 deletions.
  1. +2 −2 bench/bench_create.rb
  2. +1 −1 bench/bench_model.rb
@@ -1,10 +1,10 @@
require File.dirname(__FILE__) + '/bench_model'
-puts "Widget.new.valid?"
+puts "Widget.create"
Benchmark.bm do |make|
TIMES.times do
make.report do
- 1_000.times do
+ 10_000.times do
Widget.create!(:name => "bench", :description => "Bench record")
end
end
@@ -36,7 +36,7 @@
end
require 'benchmark'
-if defined? RUBY_ENGINE && RUBY_ENGINE == "jruby"
+if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../drivers/mysql/lib'
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../adapters/mysql/lib'

0 comments on commit 4c5c991

Please sign in to comment.