rails-profiler 0.32.0 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 623e8531db783ddb27296b83dba2beae12f411e6b2c71630c3b14003b7e67f40
4
- data.tar.gz: eebbf3cda8334b412ca1a4543cb81f7ef05e65c0f28672794fc9f0b7b57a250f
3
+ metadata.gz: 403d9ff1c8dc1f63d91b2ae71490ab29ef762da12f035ca1cd566d2e036083e5
4
+ data.tar.gz: d63bf66a090688c87efbcfa4c84140c25c0d611f1f760c3c4ff8c24410ce98f1
5
5
  SHA512:
6
- metadata.gz: 27241cbff0c9d09418f1d75a6757a55dba4b6474b822860f11e98b5149d2dda4b7fe7ad13a03e136bf9c1ca56dbd9fbdf4366dc394fa7127d3d9bba69cf23944
7
- data.tar.gz: 25ad634237aecccf4a698f3ba7f221afbc53965a5b3a18845336c2ce8fef257f1d7fc8234b40545153fe0a9ba7b28fae92f52708994a50d4e81063d0a789116b
6
+ metadata.gz: db9b3d2fbc40310a01d3bde8675f218931bcdb35409c677ae1fc9ca8b490fe0103aba880db1bee5a16d6dda96ebc5caa7763cecc50e3638b3ee74eb60c4a35d4
7
+ data.tar.gz: fe872b2809ec74b20f449cbafbfe3ee440f78ad54e909e0415ce90c222206c8108d191689366655ddcdaf1bbca83cdda489f51e41f59d190fc25fb43945c936b
data/CHANGELOG.md CHANGED
@@ -19,6 +19,36 @@ every commit of every tag interval is accounted for one way or the other.
19
19
 
20
20
  ## [Unreleased]
21
21
 
22
+ ## [0.32.2] - 2026-10-13
23
+
24
+ <!-- stamped -->
25
+
26
+ ### Fixed
27
+
28
+ - **Test profiling:** `Profiler::TestHelpers::RSpecSupport.install` no longer makes every RSpec
29
+ example fail with `NoMethodError: undefined method 'line_number'`. The workaround documented
30
+ for 0.32.1, a hand-written `around` hook, can be replaced by `install` again.
31
+ - **Test profiling:** Failing and pending RSpec examples are recorded with their real status,
32
+ `failed` or `pending`, instead of `passed`, in the test profiles and in the report printed
33
+ after the suite. A failure keeps its message, and an example marked `pending` or `skip` in its
34
+ body keeps its reason. This holds for an example tagged `:aggregate_failures` and for a failure
35
+ raised by an `around` hook of the suite, which the profiler now wraps.
36
+ - **Test profiling:** With Minitest, an error raised by the profiler no longer runs the test a
37
+ second time, unprofiled, while hiding the error. The test fails with that error, once, and the
38
+ run goes on with the next tests.
39
+
40
+ ## [0.32.1] - 2026-10-13
41
+
42
+ <!-- stamped -->
43
+
44
+ ### Fixed
45
+
46
+ - **Packaging:** The published gem now contains its `LICENSE` file, which the MIT license asks
47
+ every copy to carry and which was missing from the gem up to 0.32.0, and a new
48
+ `THIRD-PARTY-NOTICES.md` that reproduces the copyright and license notices of the three MIT
49
+ packages compiled into the dashboard and toolbar JavaScript: `preact`, `@tanstack/preact-query`
50
+ and `@tanstack/query-core`. The license of the gem does not change, it stays MIT.
51
+
22
52
  ## [0.32.0] - 2026-10-06
23
53
 
24
54
  <!-- stamped -->
@@ -407,7 +437,7 @@ every commit of every tag interval is accounted for one way or the other.
407
437
 
408
438
  - **Cluster:** `config.cluster_allowed_slave_urls` accepts `Regexp` entries next to URLs, for
409
439
  slaves whose names are not known in advance, such as one container per git worktree:
410
- `[%r{\Ahttp://travel-api-[a-z0-9-]+:3000\z}]`. Until now such a setup had to fall back to
440
+ `[%r{\Ahttp://myapp-[a-z0-9-]+:3000\z}]`. Until now such a setup had to fall back to
411
441
  `:any`, which reopens the server-side request forgery closed in 0.30.11. A pattern must start
412
442
  with `\A` and end with `\z`, and compile once wrapped to match the whole URL; any other `Regexp`
413
443
  raises an `ArgumentError` when assigned. It is matched as a whole against the URL as the master
@@ -835,323 +865,323 @@ every commit of every tag interval is accounted for one way or the other.
835
865
 
836
866
  ### Fixed
837
867
 
838
- - **Cluster:** Resolve profiles across slaves from the master `ProfilesController` <!-- 9236c4c -->
868
+ - **Cluster:** Resolve profiles across slaves from the master `ProfilesController` <!-- 57d379f -->
839
869
 
840
870
  ## [0.30.3] - 2026-06-29
841
871
 
842
872
  ### Fixed
843
873
 
844
- - Wrap the profile dashboards and `TestRunnerPage` with `QueryClientProvider` <!-- 420ae2f -->
874
+ - Wrap the profile dashboards and `TestRunnerPage` with `QueryClientProvider` <!-- e5ad047 -->
845
875
 
846
876
  ## [0.30.2] - 2026-06-29
847
877
 
848
878
  ### Fixed
849
879
 
850
- - **Middleware:** Duplicate downstream headers before mutating them <!-- 3efb20c -->
880
+ - **Middleware:** Duplicate downstream headers before mutating them <!-- 01cea9c -->
851
881
 
852
882
  ## [0.30.1] - 2026-06-29
853
883
 
854
884
  ### Fixed
855
885
 
856
- - **Cluster:** Fix sentinel mismatch, profile list pagination, nil safety in MCP tools and HTTPS slave URLs <!-- 4b5fb1c -->
886
+ - **Cluster:** Fix sentinel mismatch, profile list pagination, nil safety in MCP tools and HTTPS slave URLs <!-- a8a508b -->
857
887
 
858
888
  ## [0.30.0] - 2026-06-28
859
889
 
860
890
  ### Added
861
891
 
862
- - **Cluster:** Add master/slave profiler clustering <!-- 1435f22 -->
892
+ - **Cluster:** Add master/slave profiler clustering <!-- 8109047 -->
863
893
 
864
894
  ## [0.29.0] - 2026-06-28
865
895
 
866
896
  ### Added
867
897
 
868
- - **SSE:** Push live profile updates over server-sent events <!-- fa0ae2e -->
898
+ - **SSE:** Push live profile updates over server-sent events <!-- ff431f6 -->
869
899
 
870
900
  ## [0.28.0] - 2026-06-06
871
901
 
872
902
  ### Added
873
903
 
874
- - **HTTP:** Add the `http_backtrace_depth` configuration option <!-- 25b4f99 -->
904
+ - **HTTP:** Add the `http_backtrace_depth` configuration option <!-- e15864c -->
875
905
 
876
906
  ## [0.27.1] - 2026-06-06
877
907
 
878
908
  ### Changed
879
909
 
880
- - **API:** Replace manual `fetch()` calls with `orval` generated TanStack Query hooks <!-- e33341e -->
910
+ - **API:** Replace manual `fetch()` calls with `orval` generated TanStack Query hooks <!-- cc3e2ca -->
881
911
 
882
912
  ### Fixed
883
913
 
884
- - **File store:** Prevent `ENOENT` errors on concurrent profile file deletion <!-- 8898f0e -->
914
+ - **File store:** Prevent `ENOENT` errors on concurrent profile file deletion <!-- d1dd476 -->
885
915
 
886
916
  ## [0.27.0] - 2026-06-02
887
917
 
888
918
  ### Added
889
919
 
890
- - **MCP:** Add console profiling, mailer detail, logs/env/i18n sections and full documentation <!-- ca362a1 -->
920
+ - **MCP:** Add console profiling, mailer detail, logs/env/i18n sections and full documentation <!-- 9f97a3f -->
891
921
 
892
922
  ## [0.26.0] - 2026-06-02
893
923
 
894
924
  ### Added
895
925
 
896
- - **Test profiler:** Add the `run_tests` MCP tool, the `track_tests` option, specs and docs <!-- 265ce03 -->
897
- - **Test profiler:** Enrich reporter, add SSE streaming, MCP tools and env safety <!-- a410c4b -->
898
- - **Test profiler:** Add test profiling, test runner UI and MCP tool <!-- a116fcb -->
926
+ - **Test profiler:** Add the `run_tests` MCP tool, the `track_tests` option, specs and docs <!-- 5c63fc0 -->
927
+ - **Test profiler:** Enrich reporter, add SSE streaming, MCP tools and env safety <!-- 58b2d8b -->
928
+ - **Test profiler:** Add test profiling, test runner UI and MCP tool <!-- 4c50149 -->
899
929
 
900
930
  ## [0.25.0] - 2026-06-01
901
931
 
902
932
  ### Added
903
933
 
904
- - **Console:** Add a console profiling tab with IRB instrumentation <!-- f29937a -->
934
+ - **Console:** Add a console profiling tab with IRB instrumentation <!-- c6ce1b7 -->
905
935
 
906
936
  ### Changed
907
937
 
908
- - **Docs:** Document the console profiling tab and the env override behaviour <!-- 031cac6 -->
938
+ - **Docs:** Document the console profiling tab and the env override behaviour <!-- e4f6fe9 -->
909
939
 
910
940
  <!-- excluded:
911
- bd55e9b specs only, no visible change
941
+ e8941a4 specs only, no visible change
912
942
  -->
913
943
 
914
944
  ## [0.24.0] - 2026-06-01
915
945
 
916
946
  ### Added
917
947
 
918
- - **MCP:** Add tools to manage `ENV` variables <!-- 9126194 -->
948
+ - **MCP:** Add tools to manage `ENV` variables <!-- 52f43ce -->
919
949
 
920
950
  ## [0.23.0] - 2026-05-27
921
951
 
922
952
  ### Added
923
953
 
924
- - **Profile list:** Add a global clear-all button and auto-refresh on tab switch <!-- 460a110 -->
954
+ - **Profile list:** Add a global clear-all button and auto-refresh on tab switch <!-- b85fc97 -->
925
955
 
926
956
  ## [0.22.1] - 2026-05-26
927
957
 
928
958
  ### Fixed
929
959
 
930
- - **HTTP:** Propagate collector to child threads, add fire-and-forget support, fix deep backtrace capture <!-- 9d0bd61 -->
960
+ - **HTTP:** Propagate collector to child threads, add fire-and-forget support, fix deep backtrace capture <!-- 8fd3f63 -->
931
961
 
932
962
  ## [0.22.0] - 2026-05-04
933
963
 
934
964
  ### Added
935
965
 
936
- - **Mailer:** Add a body preview, a variables display, a queued badge and design alignment <!-- b7d608f -->
937
- - **Collector:** Implement `MailerCollector`, tracking ActionMailer deliveries <!-- e59dd72 -->
966
+ - **Mailer:** Add a body preview, a variables display, a queued badge and design alignment <!-- d016698 -->
967
+ - **Collector:** Implement `MailerCollector`, tracking ActionMailer deliveries <!-- b1705c9 -->
938
968
 
939
969
  ### Changed
940
970
 
941
- - **Toolbar:** Remove the emoji from the mailer toolbar item and the dashboard tab <!-- 55df9bb -->
971
+ - **Toolbar:** Remove the emoji from the mailer toolbar item and the dashboard tab <!-- f18e615 -->
942
972
 
943
973
  ### Fixed
944
974
 
945
- - **Mailer:** Add the Mailers tab to `JobProfileDashboard` <!-- 4ce145d -->
946
- - **Mailer:** Fix thread isolation and `deliver_later` mode detection <!-- 6e76a99 -->
947
- - **Mailer:** Add `MailerCollector` to the job profiler and align the toolbar item design <!-- 915be28 -->
948
- - **Mailer:** Handle the Rails 7 encoded mail string in the `deliver.action_mailer` payload <!-- 5479dcf -->
949
- - **Mailer:** Replace `Thread.current.delete` with a read and nil write for fiber local variables <!-- 8787201 -->
950
- - **Version:** Remove the pre-release suffix, which broke Bundler resolution <!-- 98caecd -->
951
- - **Mailer:** Address code review findings from MR !32 <!-- b46d3d2 -->
975
+ - **Mailer:** Add the Mailers tab to `JobProfileDashboard` <!-- 05f0549 -->
976
+ - **Mailer:** Fix thread isolation and `deliver_later` mode detection <!-- 35c9de3 -->
977
+ - **Mailer:** Add `MailerCollector` to the job profiler and align the toolbar item design <!-- e566a77 -->
978
+ - **Mailer:** Handle the Rails 7 encoded mail string in the `deliver.action_mailer` payload <!-- c5519ce -->
979
+ - **Mailer:** Replace `Thread.current.delete` with a read and nil write for fiber local variables <!-- 2828c44 -->
980
+ - **Version:** Remove the pre-release suffix, which broke Bundler resolution <!-- eba7e9f -->
981
+ - **Mailer:** Address code review findings from MR !32 <!-- 655d090 -->
952
982
 
953
983
  ## [0.21.0] - 2026-05-02
954
984
 
955
985
  ### Added
956
986
 
957
- - **Toolbar:** Add a collapse/expand toggle <!-- 8f0669a -->
987
+ - **Toolbar:** Add a collapse/expand toggle <!-- 7bc637a -->
958
988
 
959
989
  ## [0.20.0] - 2026-05-01
960
990
 
961
991
  ### Added
962
992
 
963
- - **UI:** Display the gem version and warn on a mismatch <!-- 64ff6eb -->
993
+ - **UI:** Display the gem version and warn on a mismatch <!-- a2509c2 -->
964
994
 
965
995
  ## [0.19.2] - 2026-04-24
966
996
 
967
997
  ### Fixed
968
998
 
969
- - **HTTP:** Capture `RestClient` `body_stream`, remove body size limits, show bodies in MCP tool results <!-- 89fb0e5 -->
999
+ - **HTTP:** Capture `RestClient` `body_stream`, remove body size limits, show bodies in MCP tool results <!-- 20654f5 -->
970
1000
 
971
1001
  <!-- excluded:
972
- 4527e12 release plumbing, version placeholder reset
1002
+ a9f2cd3 release plumbing, version placeholder reset
973
1003
  -->
974
1004
 
975
1005
  ## [0.19.1] - 2026-04-17
976
1006
 
977
1007
  ### Fixed
978
1008
 
979
- - **Env vars:** Fix revert restoring wrong value, SQLite busy errors, middleware rescue handling and UI refresh <!-- 55c8661 -->
1009
+ - **Env vars:** Fix revert restoring wrong value, SQLite busy errors, middleware rescue handling and UI refresh <!-- 33bd079 -->
980
1010
 
981
1011
  <!-- excluded:
982
- 4637391 pipeline only
983
- b53b4d7 pipeline only
984
- 7b33bf6 pipeline only
1012
+ 9da240b pipeline only
1013
+ 09748d1 pipeline only
1014
+ 4e8500b pipeline only
985
1015
  -->
986
1016
 
987
1017
  ## [0.19.0] - 2026-04-15
988
1018
 
989
1019
  ### Added
990
1020
 
991
- - **Env:** Propagate env var overrides to Sidekiq workers <!-- e75a883 -->
1021
+ - **Env:** Propagate env var overrides to Sidekiq workers <!-- c404799 -->
992
1022
 
993
1023
  ## [0.18.0] - 2026-04-14
994
1024
 
995
1025
  ### Changed
996
1026
 
997
- - **UI:** Extract shared tab utilities and redesign the Request tab <!-- 7aa8adb -->
1027
+ - **UI:** Extract shared tab utilities and redesign the Request tab <!-- 47e6269 -->
998
1028
 
999
1029
  ### Fixed
1000
1030
 
1001
- - **HTTP:** Capture outbound request body passed as second argument to `http.request()` <!-- 5a59665 -->
1031
+ - **HTTP:** Capture outbound request body passed as second argument to `http.request()` <!-- 2dda00f -->
1002
1032
 
1003
1033
  ## [0.17.0] - 2026-04-13
1004
1034
 
1005
1035
  ### Added
1006
1036
 
1007
- - **Dashboard:** Add env tab on the home page and env/job toolbar items <!-- d0277ab -->
1037
+ - **Dashboard:** Add env tab on the home page and env/job toolbar items <!-- c623c40 -->
1008
1038
 
1009
1039
  ## [0.16.0] - 2026-04-13
1010
1040
 
1011
1041
  ### Added
1012
1042
 
1013
- - **Function profiler:** Add `stackprof` sampling mode with multi-clock support and GC visibility <!-- 5f73512 -->
1043
+ - **Function profiler:** Add `stackprof` sampling mode with multi-clock support and GC visibility <!-- 5f461d9 -->
1014
1044
 
1015
1045
  ### Fixed
1016
1046
 
1017
- - **Function profiler:** Fix `stackprof` bugs, remove minimal mode, improve performance <!-- 76c6197 -->
1047
+ - **Function profiler:** Fix `stackprof` bugs, remove minimal mode, improve performance <!-- 8adc3ca -->
1018
1048
 
1019
1049
  ## [0.15.0] - 2026-04-11
1020
1050
 
1021
1051
  ### Added
1022
1052
 
1023
- - **Env:** Add environment variables tab <!-- 0e85f18 -->
1053
+ - **Env:** Add environment variables tab <!-- fa3bcec -->
1024
1054
 
1025
1055
  ## [0.14.0] - 2026-04-09
1026
1056
 
1027
1057
  ### Added
1028
1058
 
1029
- - **Profiler:** Link jobs to their triggering request or parent job <!-- 74ba5e3 -->
1059
+ - **Profiler:** Link jobs to their triggering request or parent job <!-- 5d598f6 -->
1030
1060
 
1031
1061
  ## [0.13.0] - 2026-04-09
1032
1062
 
1033
1063
  ### Added
1034
1064
 
1035
- - **UI:** Add copy/download buttons on HTTP bodies, waterfall view, date sort, and other UX improvements <!-- 5afd003 -->
1036
- - **UI:** Always show waterfall above the HTTP request list <!-- 32c6b6d -->
1037
- - **UI:** Use `SmartBodyPreview` in RequestTab for copy/download on request and response bodies <!-- aef4c0c -->
1065
+ - **UI:** Add copy/download buttons on HTTP bodies, waterfall view, date sort, and other UX improvements <!-- e7b430b -->
1066
+ - **UI:** Always show waterfall above the HTTP request list <!-- bec6cb0 -->
1067
+ - **UI:** Use `SmartBodyPreview` in RequestTab for copy/download on request and response bodies <!-- 439a9ac -->
1038
1068
 
1039
1069
  ### Fixed
1040
1070
 
1041
- - **UI:** Derive download file extension from actual MIME type instead of body category <!-- 1dc0bc8 -->
1042
- - **UI:** Move `sortedJobs` after `filteredJobs` to fix TDZ error <!-- d4de7bc -->
1071
+ - **UI:** Derive download file extension from actual MIME type instead of body category <!-- 987a65e -->
1072
+ - **UI:** Move `sortedJobs` after `filteredJobs` to fix TDZ error <!-- 235d492 -->
1043
1073
 
1044
1074
  ## [0.12.0] - 2026-04-09
1045
1075
 
1046
1076
  ### Added
1047
1077
 
1048
- - **Profiler:** Add function-level profiling with flamegraph and stats table <!-- fcb04a6 -->
1078
+ - **Profiler:** Add function-level profiling with flamegraph and stats table <!-- 2781cff -->
1049
1079
 
1050
1080
  ## [0.11.1] - 2026-04-09
1051
1081
 
1052
1082
  ### Added
1053
1083
 
1054
- - **Config:** Add `tmp_path` option to centralize the storage directory <!-- 5e77944 -->
1084
+ - **Config:** Add `tmp_path` option to centralize the storage directory <!-- d68a4c7 -->
1055
1085
 
1056
1086
  ### Fixed
1057
1087
 
1058
- - **MCP:** Decompress gzip+base64 bodies before returning to UI and MCP tool results <!-- 8f5ac47 -->
1088
+ - **MCP:** Decompress gzip+base64 bodies before returning to UI and MCP tool results <!-- c551773 -->
1059
1089
 
1060
1090
  ## [0.11.0] - 2026-04-06
1061
1091
 
1062
1092
  ### Added
1063
1093
 
1064
- - **UI:** Add load-more pagination to the profile list <!-- 9f8458b -->
1094
+ - **UI:** Add load-more pagination to the profile list <!-- ef49a2a -->
1065
1095
 
1066
1096
  ## [0.10.1] - 2026-04-06
1067
1097
 
1068
1098
  ### Changed
1069
1099
 
1070
- - **Docs:** Add full user documentation, with a UI guide, an MCP guide and screenshots <!-- 80a9198 -->
1100
+ - **Docs:** Add full user documentation, with a UI guide, an MCP guide and screenshots <!-- 2e34dc1 -->
1071
1101
 
1072
1102
  ## [0.10.0] - 2026-04-06
1073
1103
 
1074
1104
  ### Added
1075
1105
 
1076
- - **Middleware:** Add configurable CORS origins, CSP nonce support and body compression <!-- 3a42188 -->
1106
+ - **Middleware:** Add configurable CORS origins, CSP nonce support and body compression <!-- bb13049 -->
1077
1107
 
1078
1108
  ## [0.9.1] - 2026-04-06
1079
1109
 
1080
1110
  ### Removed
1081
1111
 
1082
- - **Collectors:** Remove `PerformanceCollector`, replaced by `FlameGraphCollector` <!-- 212e155 -->
1112
+ - **Collectors:** Remove `PerformanceCollector`, replaced by `FlameGraphCollector` <!-- fd03ac6 -->
1083
1113
 
1084
1114
  ## [0.9.0] - 2026-04-06
1085
1115
 
1086
1116
  ### Added
1087
1117
 
1088
- - **Profiler:** Add the `Profiler.measure` custom instrumentation API <!-- 0a3044e -->
1118
+ - **Profiler:** Add the `Profiler.measure` custom instrumentation API <!-- a3ab553 -->
1089
1119
 
1090
1120
  ## [0.8.0] - 2026-04-05
1091
1121
 
1092
1122
  ### Added
1093
1123
 
1094
- - **UI:** Add sortable columns, quick filter presets and flamegraph search <!-- ffd2e6f -->
1124
+ - **UI:** Add sortable columns, quick filter presets and flamegraph search <!-- 5bfb511 -->
1095
1125
 
1096
1126
  ## [0.7.0] - 2026-04-05
1097
1127
 
1098
1128
  ### Added
1099
1129
 
1100
- - **Database:** Add N+1 visual detection and `EXPLAIN ANALYZE` integration <!-- a22902d -->
1130
+ - **Database:** Add N+1 visual detection and `EXPLAIN ANALYZE` integration <!-- af266fc -->
1101
1131
 
1102
1132
  ## [0.6.0] - 2026-04-05
1103
1133
 
1104
1134
  ### Added
1105
1135
 
1106
- - **MCP:** Reduce token usage with filtering, body file saving and pagination <!-- 834251d -->
1136
+ - **MCP:** Reduce token usage with filtering, body file saving and pagination <!-- fa67dc8 -->
1107
1137
 
1108
1138
  ## [0.5.0] - 2026-04-04
1109
1139
 
1110
1140
  ### Added
1111
1141
 
1112
- - **MCP:** Add outbound IDs, a domain filter, datetimes, a latest token, exceptions and copy helpers <!-- 9330545 -->
1142
+ - **MCP:** Add outbound IDs, a domain filter, datetimes, a latest token, exceptions and copy helpers <!-- b36bc24 -->
1113
1143
 
1114
1144
  ## [0.4.0] - 2026-04-03
1115
1145
 
1116
1146
  ### Added
1117
1147
 
1118
- - **Collector:** Add an I18n panel tracking translation lookups per request <!-- 3032a15 -->
1148
+ - **Collector:** Add an I18n panel tracking translation lookups per request <!-- ef4a672 -->
1119
1149
 
1120
1150
  <!-- excluded:
1121
- b50d1eb pipeline only
1151
+ ad4fea1 pipeline only
1122
1152
  -->
1123
1153
 
1124
1154
  ## [0.3.0] - 2026-04-02
1125
1155
 
1126
1156
  ### Added
1127
1157
 
1128
- - **Collector:** Add a routes panel and enrich the request collector <!-- bdf0e3c -->
1158
+ - **Collector:** Add a routes panel and enrich the request collector <!-- febed69 -->
1129
1159
 
1130
1160
  ## [0.2.0] - 2026-03-29
1131
1161
 
1132
1162
  ### Added
1133
1163
 
1134
- - **Collector:** Add a Logs panel, capturing `Rails.logger` messages per request <!-- 0e0e7ce -->
1135
- - Publish the gem to RubyGems.org <!-- f292a21 -->
1164
+ - **Collector:** Add a Logs panel, capturing `Rails.logger` messages per request <!-- 3f1d906 -->
1165
+ - Publish the gem to RubyGems.org <!-- a63e6b4 -->
1136
1166
 
1137
1167
  <!-- excluded:
1138
- 10c1314 pipeline only, despite the fix: type
1139
- 3f97b1d pipeline only
1140
- a8c2044 pipeline only
1141
- 27cc550 pipeline only
1168
+ 17feea9 pipeline only, despite the fix: type
1169
+ 86fcb3f pipeline only
1170
+ 5891bfa pipeline only
1171
+ 81150a3 pipeline only
1142
1172
  -->
1143
1173
 
1144
1174
  ## [0.1.4] - 2026-03-29
1145
1175
 
1146
1176
  ### Added
1147
1177
 
1148
- - **Profiler:** Capture the full request and response, and add an MCP history clear <!-- 9922c8a -->
1178
+ - **Profiler:** Capture the full request and response, and add an MCP history clear <!-- 7d54262 -->
1149
1179
 
1150
1180
  ## [0.1.3] - 2026-03-29
1151
1181
 
1152
1182
  ### Changed
1153
1183
 
1154
- - **Assets:** Migrate Sass `@import` to `@use`, which removes the build deprecation warnings <!-- 1a67e48 -->
1184
+ - **Assets:** Migrate Sass `@import` to `@use`, which removes the build deprecation warnings <!-- a0ac9b5 -->
1155
1185
 
1156
1186
  ## [0.1.2] - 2026-03-25
1157
1187
 
@@ -1192,7 +1222,7 @@ carries no change to the gem, so there is nothing to report for this version.
1192
1222
  - **Profiler:** Improve memory tracking and profile deserialisation <!-- a0af47e -->
1193
1223
 
1194
1224
  <!-- excluded:
1195
- e27cdae pipeline only
1225
+ d797be5 pipeline only
1196
1226
  02d63c9 pipeline only
1197
1227
  9f598d9 subject is not conventional, tooling only
1198
1228
  7d1d823 tests only
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sébastien Duplessy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,92 @@
1
+ # Third-party notices
2
+
3
+ The compiled JavaScript shipped in this gem (`app/assets/builds/profiler.js` and
4
+ `app/assets/builds/profiler-toolbar.js`) embeds the following third-party packages. Each one is
5
+ distributed under the MIT License; its copyright and permission notice is reproduced below, as that
6
+ license requires.
7
+
8
+ The license of this gem itself is in the `LICENSE` file.
9
+
10
+ ## preact 10.29.0
11
+
12
+ - License: MIT
13
+
14
+ ```text
15
+ The MIT License (MIT)
16
+
17
+ Copyright (c) 2015-present Jason Miller
18
+
19
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20
+ of this software and associated documentation files (the "Software"), to deal
21
+ in the Software without restriction, including without limitation the rights
22
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23
+ copies of the Software, and to permit persons to whom the Software is
24
+ furnished to do so, subject to the following conditions:
25
+
26
+ The above copyright notice and this permission notice shall be included in all
27
+ copies or substantial portions of the Software.
28
+
29
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
+ SOFTWARE.
36
+ ```
37
+
38
+ ## @tanstack/preact-query 5.101.0
39
+
40
+ - License: MIT
41
+
42
+ ```text
43
+ MIT License
44
+
45
+ Copyright (c) 2021-present Tanner Linsley
46
+
47
+ Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ of this software and associated documentation files (the "Software"), to deal
49
+ in the Software without restriction, including without limitation the rights
50
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ copies of the Software, and to permit persons to whom the Software is
52
+ furnished to do so, subject to the following conditions:
53
+
54
+ The above copyright notice and this permission notice shall be included in all
55
+ copies or substantial portions of the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
63
+ SOFTWARE.
64
+ ```
65
+
66
+ ## @tanstack/query-core 5.101.0
67
+
68
+ - License: MIT
69
+
70
+ ```text
71
+ MIT License
72
+
73
+ Copyright (c) 2021-present Tanner Linsley
74
+
75
+ Permission is hereby granted, free of charge, to any person obtaining a copy
76
+ of this software and associated documentation files (the "Software"), to deal
77
+ in the Software without restriction, including without limitation the rights
78
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
79
+ copies of the Software, and to permit persons to whom the Software is
80
+ furnished to do so, subject to the following conditions:
81
+
82
+ The above copyright notice and this permission notice shall be included in all
83
+ copies or substantial portions of the Software.
84
+
85
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
89
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
91
+ SOFTWARE.
92
+ ```
@@ -24,14 +24,32 @@ module Profiler
24
24
 
25
25
  module RunWrapper
26
26
  def run
27
+ file, line = profiler_test_location
27
28
  Profiler::TestProfiler.profile(
28
29
  test_name: "#{self.class.name}##{name}",
29
- test_file: self.class.instance_method(name).source_location&.first || "",
30
- test_line: self.class.instance_method(name).source_location&.last || 0,
30
+ test_file: file,
31
+ test_line: line,
31
32
  framework: :minitest
32
33
  ) { super }
34
+ rescue StandardError => e
35
+ # Test#run captures what the test raises, so this comes from the
36
+ # profiler. Escaping, it would stop the whole run: it fails this
37
+ # test instead, as it does an RSpec example, without running it again.
38
+ self.time ||= 0
39
+ capture_exceptions { raise e }
40
+ Minitest::Result.from(self)
41
+ end
42
+
43
+ private
44
+
45
+ # Only the lookup is guarded: rescuing around super would run the test
46
+ # again whenever anything raised a NameError after it, NoMethodError
47
+ # included.
48
+ def profiler_test_location
49
+ location = self.class.instance_method(name).source_location
50
+ [location&.first || "", location&.last || 0]
33
51
  rescue NameError
34
- super
52
+ ["", 0]
35
53
  end
36
54
  end
37
55
  end
@@ -15,19 +15,70 @@ module Profiler
15
15
  # end
16
16
  module RSpecSupport
17
17
  def self.install(config)
18
- config.around(:each) do |example|
18
+ hook = proc do |example|
19
19
  Profiler::TestProfiler.profile(
20
20
  test_name: example.full_description,
21
21
  test_file: example.file_path,
22
- test_line: example.line_number,
22
+ test_line: example.metadata[:line_number],
23
23
  framework: :rspec
24
- ) { example.run }
24
+ ) do
25
+ example.run
26
+ Outcome.new(example)
27
+ end
28
+ end
29
+
30
+ # config.around would nest this hook inside the config-level around
31
+ # hooks registered before it, among them the one RSpec registers for
32
+ # :aggregate_failures when the configuration is created. An aggregated
33
+ # failure, like one raised by such a hook after the example, is only
34
+ # set on the example once that hook has returned: the example would be
35
+ # recorded as passed. Appended, the hook wraps them all. Groups already
36
+ # defined get it the way config.around gives it to them. config.hooks
37
+ # is not public API, hence the fallback.
38
+ if config.respond_to?(:hooks) && config.hooks.respond_to?(:register)
39
+ config.hooks.register(:append, :around, :example, &hook)
40
+ RSpec.world.example_groups.each do |group|
41
+ group.hooks.register(:append, :around, :example, &hook)
42
+ end
43
+ else
44
+ config.around(:example, &hook)
25
45
  end
26
46
 
27
47
  config.after(:suite) do
28
48
  Profiler::TestHelpers::Reporter.print
29
49
  end
30
50
  end
51
+
52
+ # What the profiled block hands back to TestProfiler: the same interface as
53
+ # Minitest::Result (passed?, skipped?, failure).
54
+ #
55
+ # Procsy#run returns a boolean, and execution_result.status is still nil at
56
+ # this point: Example#finish only writes it once every around hook has
57
+ # returned. The outcome is read from the state #finish relies on, in the
58
+ # same order: an exception means failed, then a pending message (from
59
+ # `pending` or `skip` in the example) means pending.
60
+ class Outcome
61
+ Reason = Struct.new(:message)
62
+
63
+ def initialize(example)
64
+ @exception = example.exception
65
+ @pending_message = example.execution_result.pending_message
66
+ end
67
+
68
+ def passed?
69
+ @exception.nil? && @pending_message.nil?
70
+ end
71
+
72
+ def skipped?
73
+ @exception.nil? && !@pending_message.nil?
74
+ end
75
+
76
+ def failure
77
+ return @exception if @exception
78
+
79
+ Reason.new(@pending_message) if @pending_message
80
+ end
81
+ end
31
82
  end
32
83
  end
33
84
  end
@@ -67,8 +67,10 @@ module Profiler
67
67
  begin
68
68
  result = block.call
69
69
 
70
- # Minitest: Test#run catches assertion errors internally and returns self.
71
- # Failures don't propagate — detect them from the result object.
70
+ # Test frameworks catch failures themselves, so they never reach the
71
+ # rescue below. The block reports them by returning an object that
72
+ # responds to passed?, skipped? and failure: Minitest::Test#run returns
73
+ # a Minitest::Result, and RSpecSupport builds an equivalent outcome.
72
74
  if result.respond_to?(:passed?)
73
75
  unless result.passed?
74
76
  test_status = result.skipped? ? "pending" : "failed"
@@ -81,17 +83,6 @@ module Profiler
81
83
  )
82
84
  end
83
85
 
84
- # RSpec: example.run catches errors internally and stores them in execution_result.
85
- if result.respond_to?(:execution_result)
86
- er = result.execution_result
87
- rspec_status = er.status&.to_s
88
- if rspec_status && rspec_status != "passed" && test_status == "passed"
89
- test_status = rspec_status
90
- msg = er.exception&.message.to_s
91
- error_message = msg.empty? ? nil : msg
92
- end
93
- end
94
-
95
86
  result
96
87
  rescue Exception => e # rubocop:disable Lint/RescueException
97
88
  # Capture all exceptions (including test failures which may subclass Exception)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Profiler
4
- VERSION = "0.32.0"
4
+ VERSION = "0.32.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.0
4
+ version: 0.32.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Duplessy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-06 00:00:00.000000000 Z
11
+ date: 2026-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,6 +104,8 @@ extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
106
  - CHANGELOG.md
107
+ - LICENSE
108
+ - THIRD-PARTY-NOTICES.md
107
109
  - app/assets/builds/profiler-toolbar.js
108
110
  - app/assets/builds/profiler.css
109
111
  - app/assets/builds/profiler.js