rack-mini-profiler 3.1.0 → 3.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7544df4d22f5f615b146fb0d63f18098ffd702ac9dec966d8040187f2e8302b9
4
- data.tar.gz: 7c39c41a96205c8c7fbd69765ab5f1e0a3a3a37950055fc58d0f27f4a0591e0f
3
+ metadata.gz: 569f89edd8e16a6577ec6e22ca4a889026678d288d9282114b8fdeaedc6be2bf
4
+ data.tar.gz: 7ec71935c344ff9113d3b4b9dc70dfaf3430fa30796075391d7d65bc008cb390
5
5
  SHA512:
6
- metadata.gz: 6e3f5f9a51fc5395dda4a7e793903f998513499d850aeb291fe036171a78617d11c3d8cd6fef57d1144359aa4992055ad54ba878075896c3d0280c426a84e3be
7
- data.tar.gz: c4e353c8442db93f29d11d04e2724e6c3f8dacaaf082210acbbb7d47655ffc3a6b5297079750e305fe9f1cd3e7efb1d806aef0ec68bbc1a8e40a0f958de0ec52
6
+ metadata.gz: dcb3c67be45ee1b7dc7516f7ddef1f4f9b6fc1513db927009aac3ef11c504caa6d9b11f3d9a8b28028c7f35f2e6e450cdc0a6b124939d1901679129a758d4499
7
+ data.tar.gz: 28b0c19d557485c1abf1e636bebe911e42c8f3706de174021af6e543c0c52c4a6fa0ecdef39518acb58d18d5284147c4b57c950186a8b630e9bd2e69acbc72c9
data/CHANGELOG.md CHANGED
@@ -1,11 +1,35 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 3.3.0 - 2023-12-07
4
+ - [FEATURE] Use `?pp=flamegraph?ignore_gc=true` or `config.flamegraph_ignore_gc` to ignore gc in flamegraphs. [#599](https://github.com/MiniProfiler/rack-mini-profiler/pull/599)
5
+
6
+ ## 3.2.1 - 2023-12-07
7
+ - [FIX] memory_profiler was broken due to an undefined local [#597](https://github.com/MiniProfiler/rack-mini-profiler/pull/597)
8
+
9
+ ## 3.2.0 - 2023-12-06
10
+ - [BREAKING CHANGE] Ruby version 2.7.0 or later is required.
11
+ - [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)
12
+ - [FEATURE] Speedscope 1.12 -> 1.16
13
+ - [FIX] If patch_rails is false, do not patch mysql2 or pg [#583](https://github.com/MiniProfiler/rack-mini-profiler/pull/583)
14
+ - [FIX] vertical position bottom now aligns the detail window correctly [#581](https://github.com/MiniProfiler/rack-mini-profiler/pull/581)
15
+ - [FIX] Webpacker hiccup in some setups [#582](https://github.com/MiniProfiler/rack-mini-profiler/pull/582)
16
+ - [INTERNAL] Capture rows instantiated by ActiveRecord, UI to be added later [#585](https://github.com/MiniProfiler/rack-mini-profiler/pull/585)
17
+ - [INTERNAL] Lots of refactoring.
18
+
19
+
20
+ ## 3.1.1 - 2023-08-01
21
+
22
+ - [FIX] Include configured base path in speedscope iframe URL [#587](https://github.com/MiniProfiler/rack-mini-profiler/pull/587)
23
+ - [FIX] Race condition starting CacheCleanupThread [#586](https://github.com/MiniProfiler/rack-mini-profiler/pull/586)
24
+ - [FEATURE] Add controller name to description [#567](https://github.com/MiniProfiler/rack-mini-profiler/pull/567)
25
+ - [FIX] 'more' link w/HTTPS [#574](https://github.com/MiniProfiler/rack-mini-profiler/pull/574)
26
+
3
27
  ## 3.1.0 - 2023-04-11
4
28
 
5
29
  - [FEATURE] The query parameter that RMP uses (by default, pp) is now configurable [#553](https://github.com/MiniProfiler/rack-mini-profiler/pull/553)
6
30
  - [FEATURE] You can now opt-out of the Net::HTTP patch by using RACK_MINI_PROFILER_PATCH_NET_HTTP="false"
7
31
  - [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 [#562](https://github.com/MiniProfiler/rack-mini-profiler/pull/562)
32
+ - [FIX] RMP pages now have more valid HTML, with title elements [#552](https://github.com/MiniProfiler/rack-mini-profiler/pull/552)
9
33
  - [BREAKING CHANGE] Ruby 2.4 and Ruby 2.5 are no longer supported.
10
34
  - [FIX] Now works with apps that don't otherwise require erb [#531](https://github.com/MiniProfiler/rack-mini-profiler/pull/531)
11
35
  - [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
 
@@ -431,6 +431,7 @@ start_hidden | `false`
431
431
  backtrace_threshold_ms | `0` | Minimum SQL query elapsed time before a backtrace is recorded.
432
432
  flamegraph_sample_rate | `0.5` | How often to capture stack traces for flamegraphs in milliseconds.
433
433
  flamegraph_mode | `:wall` | The [StackProf mode](https://github.com/tmm1/stackprof#all-options) to pass to `StackProf.run`.
434
+ flamegraph_ignore_gc | `false` | Whether to ignore garbage collection frames in flamegraphs.
434
435
  base_url_path | `'/mini-profiler-resources/'` | Path for assets; added as a prefix when naming assets and sought when responding to requests.
435
436
  cookie_path | `'/'` | Set-Cookie header path for profile cookie
436
437
  collapse_results | `true` | If multiple timing results exist in a single page, collapse them till clicked.
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; // make sure the popup doesn't extend below the fold
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(px, "px");
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 requestParts = requestName.split(" ");
1244
- var linkSrc =
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 = [];
@@ -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.timing.name) }}" class="profiler-more-actions">more</a>
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
  {{?}}