Created
February 5, 2015 17:03
-
-
Save cassioscabral/fe40942b328d12701592 to your computer and use it in GitHub Desktop.
Capybara measure time stress test
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
it "should access the page 20 times" do | |
beginning_time_all = Time.now | |
(1..20).each do |i| | |
beginning_time = Time.now | |
visit "/my/page" | |
end_time = Time.now | |
puts "Time elapsed #{(end_time - beginning_time)*1000} milliseconds" | |
end | |
end_time_all = Time.now | |
puts "ALL -> Time elapsed #{(end_time_all - beginning_time_all)*1000} milliseconds" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment