rack-mini-profiler 3.1.0 → 3.2.0
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 +4 -4
- data/CHANGELOG.md +19 -1
- data/README.md +1 -1
- data/lib/html/includes.js +5 -7
- data/lib/html/includes.tmpl +1 -1
- data/lib/html/speedscope/{import.cf0fa83f.js → import.8ae8aa3d.js} +26 -18
- data/lib/html/speedscope/index.html +1 -1
- data/lib/html/speedscope/release.txt +3 -3
- data/lib/html/speedscope/{speedscope.44364064.js → speedscope.f27db165.js} +99 -106
- data/lib/html/vendor.js +1 -1
- data/lib/mini_profiler/actions.rb +152 -0
- data/lib/mini_profiler/asset_version.rb +1 -1
- data/lib/mini_profiler/profiling_methods.rb +4 -0
- data/lib/mini_profiler/storage/memcache_store.rb +9 -0
- data/lib/mini_profiler/storage/memory_store.rb +2 -2
- data/lib/mini_profiler/timer_struct/request.rb +6 -0
- data/lib/mini_profiler/timer_struct/sql.rb +3 -1
- data/lib/mini_profiler/version.rb +1 -1
- data/lib/mini_profiler/views.rb +192 -0
- data/lib/mini_profiler.rb +55 -348
- data/lib/mini_profiler_rails/railtie.rb +12 -1
- data/lib/mini_profiler_rails/railtie_methods.rb +1 -1
- data/lib/patches/sql_patches.rb +2 -2
- data/rack-mini-profiler.gemspec +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cacf580297c537f36715f99aa7c7d9e77bce758a122d7b0047767fbdbe44c60c
|
4
|
+
data.tar.gz: 9ce08b2c74e938104ca61eeace17f659c9177e97117c45a346f3e9b3a6706d5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a40fa57fd372e7a88a566fc200ae355215fcfe0d397cbdc43322777eeb6c770e245328e6d0df0fa4286af23361979cccb85acae7c783bba90048c03af1f66800
|
7
|
+
data.tar.gz: 9b40d0e1deeb4a84e2ed147aba8684294d8bd7840b4d087d3b4ddfad700913e02953d496762a265d8ca7f5afb6a916c7133f0da0f24a40cc80952e27de2879c4
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,29 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.2.0 - 2023-12-06
|
4
|
+
- [BREAKING CHANGE] Ruby version 2.7.0 or later is required.
|
5
|
+
- [FEATURE] All RMP actions can be chosen by including a X-Rack-Mini-Profiler header as well as by query parameter. [#578](https://github.com/MiniProfiler/rack-mini-profiler/pull/578)
|
6
|
+
- [FEATURE] Speedscope 1.12 -> 1.16
|
7
|
+
- [FIX] If patch_rails is false, do not patch mysql2 or pg [#583](https://github.com/MiniProfiler/rack-mini-profiler/pull/583)
|
8
|
+
- [FIX] vertical position bottom now aligns the detail window correctly [#581](https://github.com/MiniProfiler/rack-mini-profiler/pull/581)
|
9
|
+
- [FIX] Webpacker hiccup in some setups [#582](https://github.com/MiniProfiler/rack-mini-profiler/pull/582)
|
10
|
+
- [INTERNAL] Capture rows instantiated by ActiveRecord, UI to be added later [#585](https://github.com/MiniProfiler/rack-mini-profiler/pull/585)
|
11
|
+
- [INTERNAL] Lots of refactoring.
|
12
|
+
|
13
|
+
|
14
|
+
## 3.1.1 - 2023-08-01
|
15
|
+
|
16
|
+
- [FIX] Include configured base path in speedscope iframe URL [#587](https://github.com/MiniProfiler/rack-mini-profiler/pull/587)
|
17
|
+
- [FIX] Race condition starting CacheCleanupThread [#586](https://github.com/MiniProfiler/rack-mini-profiler/pull/586)
|
18
|
+
- [FEATURE] Add controller name to description [#567](https://github.com/MiniProfiler/rack-mini-profiler/pull/567)
|
19
|
+
- [FIX] 'more' link w/HTTPS [#574](https://github.com/MiniProfiler/rack-mini-profiler/pull/574)
|
20
|
+
|
3
21
|
## 3.1.0 - 2023-04-11
|
4
22
|
|
5
23
|
- [FEATURE] The query parameter that RMP uses (by default, pp) is now configurable [#553](https://github.com/MiniProfiler/rack-mini-profiler/pull/553)
|
6
24
|
- [FEATURE] You can now opt-out of the Net::HTTP patch by using RACK_MINI_PROFILER_PATCH_NET_HTTP="false"
|
7
25
|
- [FIX] Error responses now include header values from the app, and stackprof not installed message now has correct content [#547](https://github.com/MiniProfiler/rack-mini-profiler/pull/547)
|
8
|
-
- [FIX] RMP pages now have more valid HTML, with title elements [#
|
26
|
+
- [FIX] RMP pages now have more valid HTML, with title elements [#552](https://github.com/MiniProfiler/rack-mini-profiler/pull/552)
|
9
27
|
- [BREAKING CHANGE] Ruby 2.4 and Ruby 2.5 are no longer supported.
|
10
28
|
- [FIX] Now works with apps that don't otherwise require erb [#531](https://github.com/MiniProfiler/rack-mini-profiler/pull/531)
|
11
29
|
- [DOCS] Added Heroku Redis instructions
|
data/README.md
CHANGED
@@ -178,7 +178,7 @@ export RACK_MINI_PROFILER_PATCH_NET_HTTP="false"
|
|
178
178
|
|
179
179
|
To generate [flamegraphs](http://samsaffron.com/archive/2013/03/19/flame-graphs-in-ruby-miniprofiler), add the [**stackprof**](https://rubygems.org/gems/stackprof) gem to your Gemfile.
|
180
180
|
|
181
|
-
Then, to view the flamegraph as a direct HTML response from your request, just visit any page in your app with `?pp=flamegraph` appended to the URL
|
181
|
+
Then, to view the flamegraph as a direct HTML response from your request, just visit any page in your app with `?pp=flamegraph` appended to the URL, or add the header `X-Rack-Mini-Profiler` to the request with the value `flamegraph`.
|
182
182
|
|
183
183
|
Conversely, if you want your regular response instead (which is specially useful for JSON and/or XHR requests), just append the `?pp=async-flamegraph` parameter to your request/fetch URL; the request will then return as normal, and the flamegraph data will be stored for later *async* viewing, both for this request and for all subsequent requests made by this page (based on the `REFERER` header). For viewing these async flamegraphs, use the 'flamegraph' link that will appear inside the MiniProfiler UI for these requests.
|
184
184
|
|
data/lib/html/includes.js
CHANGED
@@ -401,9 +401,10 @@ var _MiniProfiler = (function() {
|
|
401
401
|
var px = button.offsetTop - 1,
|
402
402
|
// position next to the button we clicked
|
403
403
|
windowHeight = window.innerHeight,
|
404
|
-
maxHeight = windowHeight - px - 40
|
404
|
+
maxHeight = windowHeight - px - 40, // make sure the popup doesn't extend below the fold
|
405
|
+
pxVertical = options.renderVerticalPosition === 'bottom' ? button.offsetParent.clientHeight - 21 - px : px;
|
405
406
|
|
406
|
-
popup.style[options.renderVerticalPosition] = "".concat(
|
407
|
+
popup.style[options.renderVerticalPosition] = "".concat(pxVertical, "px");
|
407
408
|
popup.style.maxHeight = "".concat(maxHeight, "px");
|
408
409
|
popup.style[options.renderHorizontalPosition] = "".concat(
|
409
410
|
button.offsetWidth - 3,
|
@@ -1240,11 +1241,8 @@ var _MiniProfiler = (function() {
|
|
1240
1241
|
return options.path + "flamegraph?id=" + id;
|
1241
1242
|
},
|
1242
1243
|
moreUrl: function moreUrl(requestName) {
|
1243
|
-
var
|
1244
|
-
|
1245
|
-
requestParts[0] == "GET" ? requestParts[1] : window.location.href;
|
1246
|
-
var linkSuffix = linkSrc.indexOf("?") > 0 ? "&pp=help" : "?pp=help";
|
1247
|
-
return linkSrc + linkSuffix;
|
1244
|
+
var linkSuffix = requestName.indexOf("?") > 0 ? "&pp=help" : "?pp=help";
|
1245
|
+
return requestName + linkSuffix;
|
1248
1246
|
},
|
1249
1247
|
getClientTimings: function getClientTimings(clientTimings) {
|
1250
1248
|
var list = [];
|
data/lib/html/includes.tmpl
CHANGED
@@ -141,7 +141,7 @@
|
|
141
141
|
|
142
142
|
<script id="linksTemplate" type="text/x-dot-tmpl">
|
143
143
|
<a href="{{= MiniProfiler.shareUrl(it.page.id) }}" class="profiler-share-profiler-results" target="_blank">share</a>
|
144
|
-
<a href="{{= MiniProfiler.moreUrl(it.
|
144
|
+
<a href="{{= MiniProfiler.moreUrl(it.page.name) }}" class="profiler-more-actions">more</a>
|
145
145
|
{{? it.page.has_flamegraph}}
|
146
146
|
<a href="{{= MiniProfiler.flamegraphUrl(it.page.id) }}" class="profiler-show-flamegraph" target="_blank">flamegraph</a>
|
147
147
|
{{?}}
|