Created
August 12, 2009 21:13
-
-
Save leshill/166769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT) | |
start_time = Time.now | |
puts "Starting CouchDB Benchmark..." | |
100000.times do |n| | |
Person.new(:first_name => "Couch_#{n}", :last_name => "Man_#{n}").save | |
end | |
puts (Time.now - start_time) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT) | |
start_time = Time.now | |
puts "Starting MongoDB Benchmark..." | |
100000.times do |n| | |
Patient.new(:first_name => "Mongo_#{n}", :last_name => "Man_#{n}").save | |
puts "." | |
end | |
puts (Time.now - start_time) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment