benchmark.rb in nyny-2.1.1 vs benchmark.rb in nyny-2.2.1
- old
+ new
@@ -91,5 +91,35 @@
end
end
run_test 'Url patterns', apps do |app|
app.get '/foo'
end
+
+# Plain routes
+apps = build_apps do
+ [:get, :post, :put].each do |method|
+ 10.times do |i|
+ send(method, "/foo/#{i}") do
+ i
+ end
+ end
+ end
+end
+run_test 'A lot o Plain routes', apps do |app|
+ app.get '/foo/5'
+end
+
+#
+# Pattern routes
+apps = build_apps do
+ [:get, :post, :put].each do |method|
+ 10.times do |i|
+ send(method, "/foo/#{i}/:action") do
+ params[:action]
+ end
+ end
+ end
+end
+run_test 'A lot of Pattern routes', apps do |app|
+ app.get '/foo/5/edit'
+end
+