From 1506624cd3de856415dae1b449507e7492daf48a Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Thu, 12 Feb 2026 15:35:26 +0000 Subject: [PATCH] Add stackprof for profiling So you can do something like this: ```ruby require "stackprof" report = StackProf.run(mode: :wall, interval: 100) do Account.find_by(external_account_id: 123) end StackProf::Report.new(report).print_text ``` --- Gemfile | 1 + Gemfile.lock | 2 ++ Gemfile.saas.lock | 2 ++ 3 files changed, 5 insertions(+) diff --git a/Gemfile b/Gemfile index 23b1223ce..ccc4da06a 100644 --- a/Gemfile +++ b/Gemfile @@ -41,6 +41,7 @@ gem "useragent", bc: "useragent" # Operations gem "autotuner" gem "mission_control-jobs" +gem "stackprof" gem "benchmark" # indirect dependency, being removed from Ruby 3.5 stdlib so here to quash warnings group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index b00219210..d20d773b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -437,6 +437,7 @@ GEM net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) ostruct + stackprof (0.2.27) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.2.0) @@ -529,6 +530,7 @@ DEPENDENCIES solid_cache (~> 1.0) solid_queue (~> 1.2) sqlite3 (>= 2.0) + stackprof stimulus-rails thruster trilogy (~> 2.9) diff --git a/Gemfile.saas.lock b/Gemfile.saas.lock index 07740c63b..84b5cf2b3 100644 --- a/Gemfile.saas.lock +++ b/Gemfile.saas.lock @@ -558,6 +558,7 @@ GEM net-sftp (>= 2.1.2) net-ssh (>= 2.8.0) ostruct + stackprof (0.2.27) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.2.0) @@ -686,6 +687,7 @@ DEPENDENCIES solid_cache (~> 1.0) solid_queue (~> 1.2) sqlite3 (>= 2.0) + stackprof stimulus-rails stripe (~> 18.0) thruster