Browse files

Merge pull request #2 from garybernhardt/master

Null out startup times
  • Loading branch information...
2 parents fd8746f + ea917b3 commit 30ecaa69f152bae294c1528b6dea16d4690ca10c @steveklabnik committed Sep 27, 2012
Showing with 9 additions and 4 deletions.
  1. +2 −0 app/views/pages/show.html.erb
  2. +7 −4 spec/requests/turbolinks_spec.rb
View
2 app/views/pages/show.html.erb
@@ -1,3 +1,5 @@
<h1>Page <%= @id %></h1>
<p>Here's a link: <%= link_to "next", page_path(@next_id, @url_opts), @link_opts %></p>
+
+<p>Back to the <%= link_to "beginning", page_path(1, @url_opts), @link_opts %></p>
View
11 spec/requests/turbolinks_spec.rb
@@ -6,16 +6,19 @@
n = ENV["TIMES"] ? ENV["TIMES"].to_i : 1000
Benchmark.bm do |x|
+ visit "/pages/1"
+ 3.times { click_link "next" }
+ click_link "beginning"
x.report " no turbolinks" do
- visit "/pages/1"
-
n.times do
click_link "next"
end
end
- x.report "yes turbolinks" do
- visit "/pages/1?turbo=true"
+ visit "/pages/1?turbo=true"
+ 3.times { click_link "next" }
+ click_link "beginning"
+ x.report "yes turbolinks" do
n.times do
click_link "next"
end

0 comments on commit 30ecaa6

Please sign in to comment.