Permalink
Browse files

try measuring Sprockets::Index

  • Loading branch information...
1 parent a9b71b2 commit 1be610c72d74814dc8447907f14ce4fa465d57c1 @mislav committed Sep 6, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 render.rb
View
@@ -110,8 +110,14 @@ def sprockets
sprockets_render
end
- # change stylesheet and render with hacked Sprockets
+ # change stylesheet and render with Sprockets::Index
def sprockets_index
+ change
+ sprockets_render $sprockets.index
+ end
+
+ # change stylesheet and render with hacked Sprockets
+ def sprockets_hacked
change
$sprockets2.send :expire_index!
sprockets_render $sprockets2
@@ -148,7 +154,8 @@ def render(options)
# x.report("direct uncached:") { assert sass(cache: false) }
x.report("direct:") { n.times { assert sass } }
x.report("sprockets:") { n.times { assert sprockets } }
- x.report("sprockets hacked:") { n.times { assert sprockets_index } }
+ x.report("sprockets index:") { n.times { assert sprockets_index } }
+ x.report("sprockets hacked:") { n.times { assert sprockets_hacked } }
end
end

0 comments on commit 1be610c

Please sign in to comment.