Sha256: 3c8330f3768b39693999f4dd78c3cc49612535886d699b72496928b0afe69475

Contents?: true

Size: 576 Bytes

Versions: 12

Compression:

Stored size: 576 Bytes

Contents

require File.dirname(__FILE__) + "/loader"

browser = create_browser
browser.goto(HTML_DIR + "/forms_with_input_elements.html")

TESTS = 10000
res = Benchmark.bmbm do |results|
  results.report("TextField#set") do
    TESTS.times { browser.text_field(:id, "new_user_first_name").set("1234567890") }
  end
  results.report("TextField#value=") do
    TESTS.times { browser.text_field(:id, "new_user_first_name").value = "1234567890" }
  end
end

puts
total = res.inject(0.0) { |mem, bm| mem + bm.real }
puts "total  : " + total.to_s
puts "average: " + (total/res.size.to_f).to_s

Version data entries

12 entries across 12 versions & 6 rubygems

Version Path
caius-celerity-0.0.6.11 benchmark/bm_text_input.rb
drnic-celerity-0.0.6.17 benchmark/bm_text_input.rb
celerity_thingista-0.9.3 benchmark/bm_text_input.rb
celerity_thingista-0.9.2 benchmark/bm_text_input.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/benchmark/bm_text_input.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/benchmark/bm_text_input.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/benchmark/bm_text_input.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/benchmark/bm_text_input.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/benchmark/bm_text_input.rb
celerity-0.9.2 benchmark/bm_text_input.rb
celerity-0.9.1 benchmark/bm_text_input.rb
no-click-exception-celerity-0.9.0 benchmark/bm_text_input.rb