Skip to content
Browse files

Simple example for require profiling

  • Loading branch information...
1 parent afcbdfc commit 29bd8f7b8975bc0442f0b63e7da077f9a3f22dc6 @jeremy jeremy committed
Showing with 17 additions and 0 deletions.
  1. +17 −0 actionpack/examples/simple.rb
View
17 actionpack/examples/simple.rb
@@ -0,0 +1,17 @@
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
+require 'action_controller'
+
+class PeopleController < ActionController::Base
+ def index
+ head :ok
+ end
+end
+
+status, headers, body = PeopleController.action(:index).call({ 'rack.input' => StringIO.new('') })
+
+puts status
+puts headers.to_yaml
+puts '---'
+body.each do |part|
+ puts part
+end

0 comments on commit 29bd8f7

Please sign in to comment.
Something went wrong with that request. Please try again.