If anyone else has done similar benchmarks, please do tell :).
- rob
If anyone else has done similar benchmarks, please do tell :).
On Mar 6, 2007, at 21:05, Rob S. wrote:
Home
rails-161/If anyone else has done similar benchmarks, please do tell :).
I created a scaffold application with one database table and one
database field then ran the below script against each. I found no
difference in times for 100 iterations.
Each took ~ 1m45s running in production mode on WEBrick.
There may be particular methods that have gotten slower or faster,
but for the common code paths I find this doubtful.
require ‘rubygems’
require ‘mechanize’
count = 0
N = ARGV.first.to_i
agent = WWW::Mechanize.new
page = agent.get ‘http://localhost:3000/compares/index’
N.times do |i|
puts " → #{i}"
puts page.title
page = page.links.last.click
form = page.forms.first
form.fields.name(‘compare[data]’).value = “data #{count += 1}”
page = agent.submit form
puts page.title
page = page.links.first.click # Show
puts page.title
page = page.links.first.click # Edit
form = page.forms.first
form.fields.name(‘compare[data]’).value += " edited"
page = agent.submit form
puts page.title
page = page.links.last.click # Back
puts page.title
page = agent.post page.links[2].href # Destroy
puts page.title
end
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs