rack-mini-profiler 1.0.2 → 3.1.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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +138 -21
  3. data/README.md +201 -94
  4. data/lib/enable_rails_patches.rb +5 -0
  5. data/lib/generators/rack_mini_profiler/USAGE +9 -0
  6. data/lib/generators/rack_mini_profiler/install_generator.rb +13 -0
  7. data/lib/generators/{rack_profiler/templates/rack_profiler.rb → rack_mini_profiler/templates/rack_mini_profiler.rb} +1 -1
  8. data/lib/generators/rack_profiler/install_generator.rb +6 -3
  9. data/lib/html/dot.1.1.2.min.js +2 -0
  10. data/lib/html/includes.css +144 -45
  11. data/lib/html/includes.js +1423 -1009
  12. data/lib/html/includes.scss +538 -441
  13. data/lib/html/includes.tmpl +231 -148
  14. data/lib/html/pretty-print.js +810 -0
  15. data/lib/html/profile_handler.js +1 -1
  16. data/lib/html/rack-mini-profiler.css +3 -0
  17. data/lib/html/rack-mini-profiler.js +2 -0
  18. data/lib/html/share.html +0 -1
  19. data/lib/html/speedscope/LICENSE +21 -0
  20. data/lib/html/speedscope/README.md +3 -0
  21. data/lib/html/speedscope/demangle-cpp.1768f4cc.js +4 -0
  22. data/lib/html/speedscope/favicon-16x16.f74b3187.png +0 -0
  23. data/lib/html/speedscope/favicon-32x32.bc503437.png +0 -0
  24. data/lib/html/speedscope/file-format-schema.json +324 -0
  25. data/lib/html/speedscope/fonts/source-code-pro-regular.css +8 -0
  26. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff +0 -0
  27. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff2 +0 -0
  28. data/lib/html/speedscope/import.cf0fa83f.js +115 -0
  29. data/lib/html/speedscope/index.html +2 -0
  30. data/lib/html/speedscope/release.txt +3 -0
  31. data/lib/html/speedscope/reset.8c46b7a1.css +2 -0
  32. data/lib/html/speedscope/source-map.438fa06b.js +24 -0
  33. data/lib/html/speedscope/speedscope.44364064.js +200 -0
  34. data/lib/html/vendor.js +848 -0
  35. data/lib/mini_profiler/asset_version.rb +3 -2
  36. data/lib/mini_profiler/client_settings.rb +15 -7
  37. data/lib/mini_profiler/config.rb +51 -5
  38. data/lib/mini_profiler/gc_profiler.rb +1 -1
  39. data/lib/mini_profiler/profiling_methods.rb +13 -8
  40. data/lib/mini_profiler/snapshots_transporter.rb +109 -0
  41. data/lib/mini_profiler/storage/abstract_store.rb +52 -1
  42. data/lib/mini_profiler/storage/file_store.rb +7 -3
  43. data/lib/mini_profiler/storage/memcache_store.rb +13 -7
  44. data/lib/mini_profiler/storage/memory_store.rb +98 -5
  45. data/lib/mini_profiler/storage/redis_store.rb +226 -3
  46. data/lib/mini_profiler/storage.rb +7 -0
  47. data/lib/mini_profiler/timer_struct/base.rb +2 -0
  48. data/lib/mini_profiler/timer_struct/custom.rb +1 -0
  49. data/lib/mini_profiler/timer_struct/page.rb +60 -4
  50. data/lib/mini_profiler/timer_struct/request.rb +53 -11
  51. data/lib/mini_profiler/timer_struct/sql.rb +6 -2
  52. data/lib/mini_profiler/timer_struct.rb +8 -0
  53. data/lib/mini_profiler/version.rb +2 -1
  54. data/lib/{mini_profiler/profiler.rb → mini_profiler.rb} +394 -82
  55. data/lib/mini_profiler_rails/railtie.rb +88 -7
  56. data/lib/mini_profiler_rails/railtie_methods.rb +61 -0
  57. data/lib/patches/db/activerecord.rb +1 -12
  58. data/lib/patches/db/mongo.rb +1 -1
  59. data/lib/patches/db/moped.rb +1 -1
  60. data/lib/patches/db/mysql2/alias_method.rb +30 -0
  61. data/lib/patches/db/mysql2/prepend.rb +34 -0
  62. data/lib/patches/db/mysql2.rb +4 -27
  63. data/lib/patches/db/plucky.rb +4 -4
  64. data/lib/patches/db/riak.rb +1 -1
  65. data/lib/patches/net_patches.rb +21 -10
  66. data/lib/patches/sql_patches.rb +13 -5
  67. data/lib/prepend_mysql2_patch.rb +5 -0
  68. data/lib/prepend_net_http_patch.rb +5 -0
  69. data/lib/rack-mini-profiler.rb +1 -24
  70. data/rack-mini-profiler.gemspec +17 -8
  71. metadata +156 -32
  72. data/lib/html/jquery.1.7.1.js +0 -4
  73. data/lib/html/jquery.tmpl.js +0 -486
  74. data/lib/html/list.css +0 -9
  75. data/lib/html/list.js +0 -38
  76. data/lib/html/list.tmpl +0 -34
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4fa3a381694869814cd3d19c37f76c8c0a4bdddda170ed5199266a14e82e6c55
4
- data.tar.gz: c75b035729657117744511f53ced6c7fe76383d5b7ee253a3aa5af1a60b1364c
3
+ metadata.gz: 7544df4d22f5f615b146fb0d63f18098ffd702ac9dec966d8040187f2e8302b9
4
+ data.tar.gz: 7c39c41a96205c8c7fbd69765ab5f1e0a3a3a37950055fc58d0f27f4a0591e0f
5
5
  SHA512:
6
- metadata.gz: 1198efbc5b26cc99d9a0e296fa82f45ea27eb590489324a9cca1bfd764e3994e88cfd4b7d9e16db251b08d570cc6571653f25b23d89bad730323ac3b5369d730
7
- data.tar.gz: 8ebb0d569583e67667b725443fd9349a4c9cd588320ec8d57ec49ab18a82a7e9a5e92cd36c346f7b94448844a6b37bc2874e354629e5c3fc8bb9d4c8714734d9
6
+ metadata.gz: 6e3f5f9a51fc5395dda4a7e793903f998513499d850aeb291fe036171a78617d11c3d8cd6fef57d1144359aa4992055ad54ba878075896c3d0280c426a84e3be
7
+ data.tar.gz: c4e353c8442db93f29d11d04e2724e6c3f8dacaaf082210acbbb7d47655ffc3a6b5297079750e305fe9f1cd3e7efb1d806aef0ec68bbc1a8e40a0f958de0ec52
data/CHANGELOG.md CHANGED
@@ -1,10 +1,127 @@
1
1
  # CHANGELOG
2
2
 
3
- ## 1.0.2 2019-02-05
3
+ ## 3.1.0 - 2023-04-11
4
+
5
+ - [FEATURE] The query parameter that RMP uses (by default, pp) is now configurable [#553](https://github.com/MiniProfiler/rack-mini-profiler/pull/553)
6
+ - [FEATURE] You can now opt-out of the Net::HTTP patch by using RACK_MINI_PROFILER_PATCH_NET_HTTP="false"
7
+ - [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)
9
+ - [BREAKING CHANGE] Ruby 2.4 and Ruby 2.5 are no longer supported.
10
+ - [FIX] Now works with apps that don't otherwise require erb [#531](https://github.com/MiniProfiler/rack-mini-profiler/pull/531)
11
+ - [DOCS] Added Heroku Redis instructions
12
+ - [DEPRECATION] We are changing the name of the generators to `rack_mini_profiler`, e.g. `rack_mini_profiler:install` [#550](https://github.com/MiniProfiler/rack-mini-profiler/pull/550)
13
+
14
+ ## 3.0.0 - 2022-02-24
15
+
16
+ - PERF: Improve snapshots page performance (#518) (introduces breaking changes to the API of `AbstractStore`, `MemoryStore` and `RedisStore`, and removes the `snapshots_limit` config option.)
17
+
18
+ ## 2.3.4 - 2022-02-23
19
+
20
+ - [FEATURE] Add cookie path support for subfolder sites
21
+ - [FIX] Remove deprecated uses of Redis#pipelined
22
+
23
+ ## 2.3.3 - 2021-08-30
24
+
25
+ - [FEATURE] Introduce `pp=flamegraph_mode`
26
+ - [FEATURE] Richer CSP configuration options
27
+ - [FEATURE] Add support for Hotwire Turbo Drive
28
+
29
+ ## 2.3.2 - 2021-04-30
30
+
31
+ - [FEATURE] Introduce `pp=async-flamegraph` for asynchronous flamegraphs
32
+
33
+ ## 2.3.1 - 2021-01-29
34
+
35
+ - [FIX] compatability with Ruby 3.0
36
+ - [FIX] compatability with peek-mysql2
37
+
38
+ ## 2.3.0 - 2020-12-29
39
+
40
+ - [FEATURE] flamegraphs are now based off speedscope
41
+
42
+ ## 2.2.1 - 2020-12-23
43
+
44
+ - [FIX] Turbolinks integration causing increasing number of GET requests
45
+ - [FEATURE] enahanced log transporter with compression and exponential backoff
46
+ - [FEATURE] sameSite=Lax added to MiniProfiler cookie
47
+
48
+ ## 2.2.0 - 2020-10-19
49
+
50
+ - [UX] Enhancements to snapshots UI
51
+ - [FEATURE] Mini Profiler cookie is now sameSite=lax
52
+ - [FEATURE] Snapshots transporter
53
+ - [FEATURE] Redact SQL queries in snapshots by default
54
+
55
+ ## 2.1.0 - 2020-09-17
56
+
57
+ - [FEATURE] Allow assets to be precompiled with Sprockets
58
+ - [FEATURE] Snapshots sampling (see README in repo)
59
+ - [FEATURE] Allow `skip_paths` config to contain regular expressions
60
+
61
+ ## 2.0.4 - 2020-08-04
62
+
63
+ - [FIX] webpacker may exist with no config, allow for that
64
+
65
+ ## 2.0.3 - 2020-07-29
66
+
67
+ - [FIX] support for deprecation free Redis 4.2
68
+ - [FEATURE] skip /packs when serving static assets
69
+ - [FEATURE] allow Net::HTTP patch to be applied with either prerpend or alias
70
+
71
+ ## 2.0.2 - 2020-05-25
72
+
73
+ - [FIX] client timings were not showing up when you clicked show trivial
74
+
75
+ ## 2.0.1 - 2020-03-17
76
+
77
+ - [REVERT] Prepend Net::HTTP patch instead of class_eval and aliasing (#429) (technique clashes with New Relic and Skylight agents)
78
+
79
+ ## 2.0.0 - 2020-03-11
80
+
81
+ - [FEATURE] Prepend Net::HTTP patch instead of class_eval and aliasing (#429)
82
+ - [FEATURE] Stop patching Rails and use `ActiveSupport::Notifications` by default (see README.md for details)
83
+
84
+ ## 1.1.6 - 2020-01-30
85
+
86
+ - [FIX] edge condition on page transition function could lead to exceptions
87
+
88
+ ## 1.1.5 - 2020-01-28
89
+
90
+ - [FIX] correct custom counter regression
91
+ - [FIX] respect max_traces_to_show
92
+ - [FIX] handle storage engine failures in whitelist mode
93
+
94
+ ## 1.1.4 - 2019-12-12
95
+
96
+ - [SECURITY] carefully crafted SQL could cause an XSS on sites that do not use CSPs
97
+
98
+ ## 1.1.3 - 2019-10-28
99
+
100
+ - [FEATURE] precompile all templates to avoid need for unsafe-eval
101
+
102
+ ## 1.1.2 - 2019-10-24
103
+
104
+ - [FIX] JS payload was not working on IE11 and leading to errors
105
+ - [FIX] Remove global singleton_class which was injected
106
+ - [FIX] Regressions post removal of jQuery
107
+
108
+ ## 1.1.1 - 2019-10-22
109
+
110
+ - [FIX] correct JavaScript fetch support header iteration (Jorge Manrubia)
111
+
112
+ ## 1.1.0 - 2019-10-01
113
+
114
+ - [FEATURE] remove jQuery dependency, switch template library to dot.js
115
+ - [FEATURE] disable all sensitive debugging methods by default (env, memory profiling) can be enabled with enable_advanced_debugging_tools.
116
+ - [FIX] when conditionally requiring rack mini profiler, asset precompile could fail
117
+ - [FEATURE] `/rack-mini-profiler/requests` can be used to monitor all requests for apps that do not have a UI (like API apps)
118
+ - [SECURITY] XSS injection in `?pp=help` via rogue uri
119
+
120
+ ## 1.0.2 - 2019-02-05
4
121
 
5
122
  - [FIX] correct script injection to work with Rails 6 and above
6
123
 
7
- ## 1.0.1 2018-12-10
124
+ ## 1.0.1 - 2018-12-10
8
125
 
9
126
  - [FIX] add support for exec_params instrumentation in PG, this method as of PG 1.1.0 no longer
10
127
  routes calls to exec / async_exec
@@ -14,7 +131,7 @@
14
131
  - [FIX] getEntriesByName is missing in iOS, workaround
15
132
  - [FEATURE] drop support for Ruby 2.2.0 we require 2.3.0 and up (EOL Ruby no longer supported)
16
133
 
17
- ## 1.0.0 2017-03-29
134
+ ## 1.0.0 - 2018-03-29
18
135
 
19
136
  - [BREAKING CHANGE] Ruby version 2.2.0 or later is required
20
137
  - [FEATURE] use new web performance API to avoid warning @MikeRogers0
@@ -22,16 +139,16 @@
22
139
  - [FIX] correct jQuery 3.0 deprecations @TiSer
23
140
  - [FIX] JS in IFRAME @naiyt
24
141
 
25
- ## 0.10.8 2017-12-01
142
+ ## 0.10.8 - 2017-12-01
26
143
 
27
144
  - [FEATURE] Add `# frozen_string_literal: true` to all `lib/**/*.rb` files
28
145
 
29
- ## 0.10.7 2017-11-24
146
+ ## 0.10.7 - 2017-11-24
30
147
 
31
148
  - [FEATURE] Replace Time.now with Process.clock_gettime(Process::CLOCK_MONOTONIC)
32
149
  - [FIX] Error with webrick and empty cache control
33
150
 
34
- ## 0.10.6 2017-10-30
151
+ ## 0.10.6 - 2017-10-30
35
152
 
36
153
  - [FEATURE] Support for vertical positions (top/bottom)
37
154
  - [FEATURE] Suppress profiler results in print media @Mike Dillon
@@ -39,11 +156,11 @@
39
156
  - [FEATURE] install generator @yhirano
40
157
  - [FEATURE] store initial cache control headers in X-MiniProfiler-Original-Cache-Control @mrasu
41
158
 
42
- ## 0.10.5 2017-05-22
159
+ ## 0.10.5 - 2017-05-22
43
160
 
44
161
  - [FIX] revert PG bind sniffing until it is properly tested
45
162
 
46
- ## 0.10.4 2017-05-17
163
+ ## 0.10.4 - 2017-05-17
47
164
 
48
165
  - [FEATURE] log binds for pg @neznauy
49
166
  - [FIX] use async exec pg monkey patch instead of exec
@@ -52,25 +169,25 @@
52
169
  - [FIX] ensure redis get_unviewed_ids returns only ids that exist
53
170
  - [FIX] correctly respect SCRIPT in env if it is sniffed by middleware
54
171
 
55
- ## 0.10.2 2017-02-08
172
+ ## 0.10.2 - 2017-02-08
56
173
 
57
174
  - [FIX] improve turbolinks support
58
175
  - [FEATURE] make location of mini_profiler injection customizable
59
176
 
60
- ## 0.10.1 2016-05-18
177
+ ## 0.10.1 - 2016-05-18
61
178
 
62
179
  - [FEATURE] push forward the security checks so no work is ever done if a valid production
63
180
  cookie is not available (@sam)
64
181
 
65
- ## 0.9.9.2 2016-03-06
182
+ ## 0.9.9.2 - 2016-03-06
66
183
 
67
184
  - [FEATURE] on pageTransition collapse previously expanded timings
68
185
 
69
- ## 0.9.9.1 2016-03-06
186
+ ## 0.9.9.1 - 2016-03-06
70
187
 
71
188
  - [FEATURE] expost MiniProfiler.pageTransition() for use by SPA web apps (@sam)
72
189
 
73
- ## 0.9.9 2016-03-06
190
+ ## 0.9.9 - 2016-03-06
74
191
 
75
192
  - [FIX] removes alias_method_chain in favor of alias_method until Ruby 1.9.3 (@ayfredlund)
76
193
  - [FIX] Dont block mongo when already patched for another db (@rrooding @kbrock)
@@ -126,7 +243,7 @@
126
243
  - [FIXED] Possible XSS (admin only)
127
244
  - [FIXED] Corrected Sql patching to avoid setting instance vars on nil which is frozen (thanks Andy, huoxito)
128
245
 
129
- ## 0.9.0.pre - 2013-12-12 (Sam Saffron)
246
+ ## 0.9.0.pre - 2013-12-05 (Sam Saffron)
130
247
  - Bumped up version to reflect the stability of the project
131
248
  - [IMPROVED] Reports for pp=profile-gc
132
249
  - [IMPROVED] pp=flamegraph&flamegraph_sample_rate=1 , allow you to specify sampling rates
@@ -136,7 +253,7 @@
136
253
  config.assets.prefix path since developers can rename the path to serve Asset Pipeline
137
254
  files from
138
255
 
139
- ## 2013-09-03
256
+ ## 0.1.31 - 2013-09-03
140
257
  - [IMPROVED] Flamegraph now has much increased fidelity
141
258
  - [REMOVED] Ripped out flamegraph so it can be isolated into a gem
142
259
  - [REMOVED] Ripped out pp=sample it just was never really used
@@ -192,13 +309,13 @@
192
309
  - [ADDED] New MemchacedStore
193
310
  - [ADDED] Rails 4 support
194
311
 
195
- ## 2012-09-12 (Sam Saffron)
312
+ ## 0.1.20 - 2012-09-12 (Sam Saffron)
196
313
  - [ADDED] pp=profile-gc: allows you to profile the GC in Ruby 1.9.3
197
314
 
198
315
  ## 0.1.19 - 2012-09-10 (Sam Saffron)
199
316
  - [FIXED] Compatibility issue with Ruby 1.8.7
200
317
 
201
- ## 0.1.17 - 2012-09-09 (Sam Saffron)
318
+ ## 0.1.17 - 2012-09-07 (Sam Saffron)
202
319
  - [FIXED] pp=sample was bust unless stacktrace was installed
203
320
 
204
321
  ## 0.1.16 - 2012-09-05 (Sam Saffron)
@@ -222,10 +339,10 @@
222
339
  ## 0.1.12.pre - 2012-08-20 (Sam Saffron)
223
340
  - [IMPROVED] Cap X-MiniProfiler-Ids at 10, otherwise the header can get killed
224
341
 
225
- ## 2012-08-10 (Sam Saffron)
342
+ ## 0.1.11.pre - 2012-08-10 (Sam Saffron)
226
343
  - [ADDED] Basic prepared statement profiling for Postgres
227
344
 
228
- ## 2012-08-07 (Sam Saffron)
345
+ ## 0.1.10 - 2012-08-07 (Sam Saffron)
229
346
  - [ADDED] Option to disable profiler for the current session (pp=disable / pp=enable)
230
347
  - [ADDED] yajl compatability contributed by Sven Riedel
231
348
 
@@ -239,7 +356,7 @@
239
356
  - [ADDED] First Paint time for Google Chrome
240
357
  - [FIXED] Ensure non Rails installs have mini profiler
241
358
 
242
- ## 2012-07-12 (Sam Saffron)
359
+ ## 0.1.6 - 2012-07-12 (Sam Saffron)
243
360
  - [ADDED] Native PG and MySql2 interceptors, this gives way more accurate times
244
361
  - [ADDED] some more client probing built in to rails
245
362
  - [IMPROVED] Refactored context so its a proper class and not a hash
@@ -253,7 +370,7 @@
253
370
  production
254
371
  - [IMPROVED] Cleaned up railties, got rid of the post authorize callback
255
372
 
256
- ## 2012-06-28 (Sam Saffron)
373
+ ## 0.1.1 - 2012-06-28 (Sam Saffron)
257
374
  - [ADDED] Started change log
258
375
  - [ADDED] added MemcacheStore
259
376
  - [IMPROVED] Corrected profiler so it properly captures POST requests (was supressing non 200s)