Skip to content

Instantly share code, notes, and snippets.

@jhawthorn
Created April 15, 2019 23:12
Show Gist options
  • Save jhawthorn/bc8417d99846a543d098a3c606d3f2c3 to your computer and use it in GitHub Desktop.
Save jhawthorn/bc8417d99846a543d098a3c606d3f2c3 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
ENV['RAILS_ROOT'] = "/Users/jhawthorn/src/current_status/"
require 'benchmark/ips'
require 'rails/all'
require 'rails/backtrace_cleaner'
class MyApp < Rails::Application
config.root = "/Users/jhawthorn/src/current_status"
end
#BACKTRACE_CLEANER = ActiveSupport::BacktraceCleaner.new
BACKTRACE_CLEANER = Rails::BacktraceCleaner.new
BACKTRACE = [
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/log_subscriber.rb:100:in `debug'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/log_subscriber.rb:45:in `sql'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/subscriber.rb:145:in `finish'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/log_subscriber.rb:107:in `finish'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/fanout.rb:160:in `finish'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/fanout.rb:62:in `block in finish'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/fanout.rb:62:in `each'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/fanout.rb:62:in `finish'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/instrumenter.rb:45:in `finish_with_state'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/instrumenter.rb:30:in `instrument'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:672:in `log'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-mini-profiler-1.0.2/lib/patches/db/activerecord.rb:34:in `log_with_miniprofiler'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb:37:in `exec_query'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:487:in `select_prepared'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:68:in `select_all'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `block in select_all'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:123:in `block in cache_sql'",
"/Users/jhawthorn/.rubies/ruby-2.6.1/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:114:in `cache_sql'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:105:in `select_all'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/querying.rb:46:in `find_by_sql'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:786:in `block in exec_queries'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:804:in `skip_query_cache_if_necessary'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:773:in `exec_queries'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:592:in `load'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:106:in `records_for'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:44:in `block in preloaded_records'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:43:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:43:in `each_slice'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:43:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:43:in `flat_map'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:43:in `preloaded_records'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:30:in `records_by_owner'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:18:in `block in run'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:17:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader/association.rb:17:in `run'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:146:in `block in preloaders_for_reflection'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:145:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:145:in `map'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:145:in `preloaders_for_reflection'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:140:in `block in preloaders_for_one'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:139:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:139:in `flat_map'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:139:in `preloaders_for_one'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:105:in `preloaders_on'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:92:in `block in preload'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:91:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:91:in `flat_map'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/associations/preloader.rb:91:in `preload'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:710:in `block in preload_associations'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:708:in `each'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:708:in `preload_associations'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:789:in `block in exec_queries'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:804:in `skip_query_cache_if_necessary'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:773:in `exec_queries'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:592:in `load'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:250:in `records'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/relation.rb:245:in `to_ary'",
"/Users/jhawthorn/src/current_status/app/controllers/home_controller.rb:3:in `index'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/abstract_controller/base.rb:196:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/rendering.rb:30:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/abstract_controller/callbacks.rb:42:in `block in process_action'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/callbacks.rb:135:in `run_callbacks'",
"/Users/jhawthorn/src/rails/actionpack/lib/abstract_controller/callbacks.rb:41:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/rescue.rb:22:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:180:in `block in instrument'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications/instrumenter.rb:24:in `instrument'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:180:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/instrumentation.rb:32:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/railties/controller_runtime.rb:27:in `process_action'",
"/Users/jhawthorn/src/rails/actionpack/lib/abstract_controller/base.rb:136:in `process'",
"/Users/jhawthorn/src/rails/actionview/lib/action_view/rendering.rb:39:in `process'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiling_methods.rb:104:in `block in profile_method'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal.rb:191:in `dispatch'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_controller/metal.rb:252:in `dispatch'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/routing/route_set.rb:51:in `dispatch'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/routing/route_set.rb:33:in `serve'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/journey/router.rb:49:in `block in serve'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/journey/router.rb:32:in `each'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/journey/router.rb:32:in `serve'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/routing/route_set.rb:837:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/tempfile_reaper.rb:15:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/etag.rb:25:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/conditional_get.rb:25:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/head.rb:12:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/http/content_security_policy.rb:18:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:232:in `context'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/session/abstract/id.rb:226:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/cookies.rb:644:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/activerecord/lib/active_record/migration.rb:560:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/callbacks.rb:101:in `run_callbacks'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/callbacks.rb:26:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/executor.rb:14:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:30:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/railties/lib/rails/rack/logger.rb:38:in `call_app'",
"/Users/jhawthorn/src/rails/railties/lib/rails/rack/logger.rb:26:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/tagged_logging.rb:80:in `block in tagged'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/tagged_logging.rb:28:in `tagged'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/tagged_logging.rb:80:in `tagged'",
"/Users/jhawthorn/src/rails/railties/lib/rails/rack/logger.rb:26:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/request_id.rb:27:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/method_override.rb:22:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/runtime.rb:22:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/executor.rb:14:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/static.rb:126:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/host_authorization.rb:83:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-mini-profiler-1.0.2/lib/mini_profiler/profiler.rb:281:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/bundler/gems/webpacker-9e671a3ebe36/lib/webpacker/dev_server_proxy.rb:29:in `perform_request'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/rack-proxy-0.6.5/lib/rack/proxy.rb:57:in `call'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:57:in `block in call'",
"/Users/jhawthorn/src/rails/activesupport/lib/active_support/notifications.rb:182:in `instrument'",
"/Users/jhawthorn/src/rails/actionpack/lib/action_dispatch/middleware/stack.rb:56:in `call'",
"/Users/jhawthorn/src/rails/railties/lib/rails/engine.rb:526:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'",
"/Users/jhawthorn/.gem/ruby/2.6.1/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'"
]
block = ->(x) do
x.report("clean(caller)") do
BACKTRACE_CLEANER.clean(BACKTRACE)
end
x.report("clean(caller.lazy).to_a") do
BACKTRACE_CLEANER.clean(BACKTRACE.lazy).to_a
end
x.report("clean(caller, :noise)") do
BACKTRACE_CLEANER.clean(BACKTRACE, :noise)
end
x.report("clean(caller.lazy).first") do
BACKTRACE_CLEANER.clean(BACKTRACE.lazy).first
end
end
Benchmark.ips(&block)
#require 'benchmark/memory'
#Benchmark.memory(&block)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment