From c3fedae73a39b6ec465a0f1ac7268fee5dd50651 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 29 Dec 2020 13:54:41 +1100 Subject: [PATCH] DEV: update rack-mini-profiler (#11597) Included support for flamegraphs using speedscope! --- Gemfile | 1 - Gemfile.lock | 6 ++---- config/initializers/006-mini_profiler.rb | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index cb86d7e4bac..3ea59bc92e5 100644 --- a/Gemfile +++ b/Gemfile @@ -192,7 +192,6 @@ gem 'htmlentities', require: false # If you want to amend mini profiler to do the monkey patches in the railties # we are open to it. by deferring require to the initializer we can configure discourse installs without it -gem 'flamegraph', require: false gem 'rack-mini-profiler', require: ['enable_rails_patches'] gem 'unicorn', require: false, platform: :ruby diff --git a/Gemfile.lock b/Gemfile.lock index 18da8de94fe..fed3f2f68bf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,7 +133,6 @@ GEM fast_xs (0.8.0) fastimage (2.2.0) ffi (1.14.2) - flamegraph (0.9.5) fspath (3.1.2) gc_tracer (1.5.1) globalid (0.4.2) @@ -265,7 +264,7 @@ GEM nio4r (~> 2.0) r2 (0.2.7) rack (2.2.3) - rack-mini-profiler (2.2.1) + rack-mini-profiler (2.3.0) rack (>= 1.2.0) rack-protection (2.1.0) rack @@ -472,7 +471,6 @@ DEPENDENCIES fast_blank fast_xs fastimage - flamegraph gc_tracer highline htmlentities @@ -559,4 +557,4 @@ DEPENDENCIES yaml-lint BUNDLED WITH - 2.1.4 + 2.2.2 diff --git a/config/initializers/006-mini_profiler.rb b/config/initializers/006-mini_profiler.rb index 86baee2e23c..0f808362b43 100644 --- a/config/initializers/006-mini_profiler.rb +++ b/config/initializers/006-mini_profiler.rb @@ -3,7 +3,7 @@ # If Mini Profiler is included via gem if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler require 'rack-mini-profiler' - require 'flamegraph' + require 'stackprof' begin require 'memory_profiler'