Skip to content

Instantly share code, notes, and snippets.

@jgonera
Created October 21, 2011 09:01
Show Gist options
  • Select an option

  • Save jgonera/1303392 to your computer and use it in GitHub Desktop.

Select an option

Save jgonera/1303392 to your computer and use it in GitHub Desktop.
Profiling Mongoid (?) problem, 1.9.2-p290
Total: 17 samples
4 23.5% 23.5% 4 23.5% garbage_collector
1 5.9% 29.4% 1 5.9% AbstractController::I18nProxy#initialize
1 5.9% 35.3% 1 5.9% ActionController::LogSubscriber#start_processing
1 5.9% 41.2% 1 5.9% ActionView::PathSet#find_all
1 5.9% 47.1% 13 76.5% ActiveSupport::Callbacks#run_callbacks
1 5.9% 52.9% 1 5.9% ActiveSupport::Configurable::ClassMethods#config
1 5.9% 58.8% 1 5.9% BSON::ObjectId#initialize
1 5.9% 64.7% 1 5.9% BSON::OrderedHash.allocate
1 5.9% 70.6% 1 5.9% Class#from_string
1 5.9% 76.5% 1 5.9% Class#process_view_paths
1 5.9% 82.4% 2 11.8% Hash#[]=
1 5.9% 88.2% 1 5.9% Rack::Request#script_name
1 5.9% 94.1% 1 5.9% String.allocate
1 5.9% 100.0% 1 5.9% Time#initialize
0 0.0% 100.0% 11 64.7% AbstractController::Base#process
0 0.0% 100.0% 7 41.2% AbstractController::Base#process_action
0 0.0% 100.0% 7 41.2% AbstractController::Callbacks#process_action
0 0.0% 100.0% 1 5.9% AbstractController::Layouts#_default_layout
0 0.0% 100.0% 1 5.9% AbstractController::Layouts#_layout_for_option
0 0.0% 100.0% 1 5.9% AbstractController::Layouts#_normalize_options
0 0.0% 100.0% 1 5.9% AbstractController::Rendering#_normalize_render
0 0.0% 100.0% 13 76.5% AbstractController::Rendering#process
0 0.0% 100.0% 1 5.9% AbstractController::Rendering#render
0 0.0% 100.0% 1 5.9% AbstractController::ViewPaths#lookup_context
0 0.0% 100.0% 1 5.9% AbstractController::ViewPaths#template_exists?
0 0.0% 100.0% 1 5.9% ActionController::Compatibility#_normalize_options
0 0.0% 100.0% 7 41.2% ActionController::ImplicitRender#send_action
0 0.0% 100.0% 1 5.9% ActionController::Instrumentation#cleanup_view_runtime
0 0.0% 100.0% 11 64.7% ActionController::Instrumentation#process_action
0 0.0% 100.0% 1 5.9% ActionController::Instrumentation#render
0 0.0% 100.0% 1 5.9% ActionController::LogSubscriber#logger
0 0.0% 100.0% 13 76.5% ActionController::Metal#dispatch
0 0.0% 100.0% 11 64.7% ActionController::ParamsWrapper#process_action
0 0.0% 100.0% 13 76.5% ActionController::RackDelegation#dispatch
0 0.0% 100.0% 1 5.9% ActionController::Rendering#_normalize_options
0 0.0% 100.0% 7 41.2% ActionController::Rendering#process_action
0 0.0% 100.0% 1 5.9% ActionController::Rendering#render
0 0.0% 100.0% 7 41.2% ActionController::Rescue#process_action
0 0.0% 100.0% 1 5.9% ActionController::Streaming#_normalize_options
0 0.0% 100.0% 13 76.5% ActionDispatch::BestStandardsSupport#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Callbacks#_run_call_callbacks
0 0.0% 100.0% 13 76.5% ActionDispatch::Callbacks#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Cookies#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Flash#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Head#call
0 0.0% 100.0% 13 76.5% ActionDispatch::ParamsParser#call
0 0.0% 100.0% 13 76.5% ActionDispatch::RemoteIp#call
0 0.0% 100.0% 1 5.9% ActionDispatch::Request#fullpath
0 0.0% 100.0% 13 76.5% ActionDispatch::Routing::RouteSet#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Routing::RouteSet::Dispatcher#call
0 0.0% 100.0% 13 76.5% ActionDispatch::Routing::RouteSet::Dispatcher#dispatch
0 0.0% 100.0% 13 76.5% ActionDispatch::ShowExceptions#call
0 0.0% 100.0% 1 5.9% ActionView::LookupContext#initialize
0 0.0% 100.0% 1 5.9% ActionView::LookupContext::ViewPaths#exists?
0 0.0% 100.0% 1 5.9% ActionView::LookupContext::ViewPaths#view_paths=
0 0.0% 100.0% 1 5.9% ActionView::PathSet#exists?
0 0.0% 100.0% 13 76.5% ActiveSupport::Cache::Strategy::LocalCache::Middleware#call
0 0.0% 100.0% 2 11.8% ActiveSupport::LogSubscriber#call
0 0.0% 100.0% 2 11.8% ActiveSupport::Notifications::Fanout#publish
0 0.0% 100.0% 2 11.8% ActiveSupport::Notifications::Fanout::Subscriber#publish
0 0.0% 100.0% 10 58.8% ActiveSupport::Notifications::Instrumenter#instrument
0 0.0% 100.0% 13 76.5% Array#optimized_each
0 0.0% 100.0% 1 5.9% BSON::ByteBuffer#put_binary
0 0.0% 100.0% 1 5.9% Benchmark#realtime
0 0.0% 100.0% 3 17.6% CBson.deserialize
0 0.0% 100.0% 3 17.6% Class#deserialize
0 0.0% 100.0% 1 5.9% Class#logger
0 0.0% 100.0% 1 5.9% Class#serialize_cstr
0 0.0% 100.0% 13 76.5% EventMachine.run_machine
0 0.0% 100.0% 1 5.9% Hash#each_pair
0 0.0% 100.0% 13 76.5% Integer#times
0 0.0% 100.0% 13 76.5% Kernel#catch
0 0.0% 100.0% 1 5.9% Kernel#dup
0 0.0% 100.0% 13 76.5% Kernel#load
0 0.0% 100.0% 2 11.8% Kernel#tap
0 0.0% 100.0% 10 58.8% Module#instrument
0 0.0% 100.0% 1 5.9% Module#ms
0 0.0% 100.0% 13 76.5% Module#run
0 0.0% 100.0% 4 23.5% Mongo::Collection#find_one
0 0.0% 100.0% 3 17.6% Mongo::Connection#read_documents
0 0.0% 100.0% 3 17.6% Mongo::Connection#receive
0 0.0% 100.0% 3 17.6% Mongo::Connection#receive_message
0 0.0% 100.0% 1 5.9% Mongo::Cursor#construct_query_message
0 0.0% 100.0% 4 23.5% Mongo::Cursor#next
0 0.0% 100.0% 4 23.5% Mongo::Cursor#refresh
0 0.0% 100.0% 4 23.5% Mongo::Cursor#send_initial_query
0 0.0% 100.0% 3 17.6% Mongo::Logging#instrument
0 0.0% 100.0% 13 76.5% Mongoid#unit_of_work
0 0.0% 100.0% 1 5.9% Mongoid::Callbacks#run_callbacks
0 0.0% 100.0% 1 5.9% Mongoid::Callbacks#run_cascading_callbacks
0 0.0% 100.0% 4 23.5% Mongoid::Collection#find_one
0 0.0% 100.0% 4 23.5% Mongoid::Collections::Master#find_one
0 0.0% 100.0% 4 23.5% Mongoid::Collections::Retry#retry_on_connection_failure
0 0.0% 100.0% 5 29.4% Mongoid::Contexts::Mongo#first
0 0.0% 100.0% 5 29.4% Mongoid::Criteria#first
0 0.0% 100.0% 1 5.9% Mongoid::Criteria#search
0 0.0% 100.0% 5 29.4% Mongoid::Criterion::Inclusion#execute_or_raise
0 0.0% 100.0% 6 35.3% Mongoid::Criterion::Inclusion#find
0 0.0% 100.0% 5 29.4% Mongoid::Criterion::Inclusion#from_map_or_db
0 0.0% 100.0% 1 5.9% Mongoid::Criterion::Inclusion#where
0 0.0% 100.0% 1 5.9% Mongoid::Criterion::Optional#for_ids
0 0.0% 100.0% 1 5.9% Mongoid::Document::ClassMethods#instantiate
0 0.0% 100.0% 1 5.9% Mongoid::Extensions::ObjectId::Conversions#convert
0 0.0% 100.0% 1 5.9% Mongoid::Factory#from_db
0 0.0% 100.0% 6 35.3% Mongoid::Finders#find
0 0.0% 100.0% 3 17.6% Mutex#synchronize
0 0.0% 100.0% 1 5.9% ProjectsController#_layout
0 0.0% 100.0% 7 41.2% ProjectsController#_run__3746277342085805719__process_action__1375344919255444622__callbacks
0 0.0% 100.0% 7 41.2% ProjectsController#_run_process_action_callbacks
0 0.0% 100.0% 7 41.2% ProjectsController#poll
0 0.0% 100.0% 13 76.5% Rack::Cache::Context#call
0 0.0% 100.0% 13 76.5% Rack::Cache::Context#call!
0 0.0% 100.0% 13 76.5% Rack::Cache::Context#forward
0 0.0% 100.0% 13 76.5% Rack::Cache::Context#invalidate
0 0.0% 100.0% 13 76.5% Rack::Cache::Context#pass
0 0.0% 100.0% 13 76.5% Rack::ConditionalGet#call
0 0.0% 100.0% 13 76.5% Rack::ETag#call
0 0.0% 100.0% 13 76.5% Rack::Lock#call
0 0.0% 100.0% 13 76.5% Rack::MethodOverride#call
0 0.0% 100.0% 13 76.5% Rack::Mongoid::Middleware::IdentityMap#call
0 0.0% 100.0% 13 76.5% Rack::Mount::RouteSet#call
0 0.0% 100.0% 13 76.5% Rack::Mount::RouteSet#recognize
0 0.0% 100.0% 13 76.5% Rack::PerftoolsProfiler::ProfileOnce#act
0 0.0% 100.0% 13 76.5% Rack::PerftoolsProfiler::Profiler#profile
0 0.0% 100.0% 13 76.5% Rack::PerftoolsProfiler::ProfilerMiddleware#call
0 0.0% 100.0% 13 76.5% Rack::PerftoolsProfiler::ProfilerMiddleware#call_app
0 0.0% 100.0% 1 5.9% Rack::Request#fullpath
0 0.0% 100.0% 1 5.9% Rack::Request#path
0 0.0% 100.0% 13 76.5% Rack::Runtime#call
0 0.0% 100.0% 13 76.5% Rack::Sendfile#call
0 0.0% 100.0% 13 76.5% Rack::Session::Abstract::ID#call
0 0.0% 100.0% 13 76.5% Rack::Session::Abstract::ID#context
0 0.0% 100.0% 13 76.5% Rails::Engine#call
0 0.0% 100.0% 13 76.5% Rails::Rack::Logger#call
0 0.0% 100.0% 13 76.5% Rails::Railtie::Configurable::ClassMethods#method_missing
0 0.0% 100.0% 13 76.5% Thin::Backends::Base#start
0 0.0% 100.0% 13 76.5% Thin::Connection#pre_process
0 0.0% 100.0% 13 76.5% Thin::Connection#process
0 0.0% 100.0% 13 76.5% Thin::Connection#receive_data
0 0.0% 100.0% 13 76.5% Thin::Controllers::Controller#start
0 0.0% 100.0% 13 76.5% Thin::Runner#run!
0 0.0% 100.0% 13 76.5% Thin::Runner#run_command
0 0.0% 100.0% 13 76.5% Thin::Server#start
0 0.0% 100.0% 1 5.9% Time.now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment