rack-mini-profiler 1.0.1 → 2.3.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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +115 -20
  3. data/README.md +126 -45
  4. data/lib/enable_rails_patches.rb +5 -0
  5. data/lib/html/dot.1.1.2.min.js +2 -0
  6. data/lib/html/includes.css +136 -35
  7. data/lib/html/includes.js +1400 -1009
  8. data/lib/html/includes.scss +546 -441
  9. data/lib/html/includes.tmpl +231 -148
  10. data/lib/html/pretty-print.js +810 -0
  11. data/lib/html/profile_handler.js +1 -1
  12. data/lib/html/rack-mini-profiler.css +3 -0
  13. data/lib/html/rack-mini-profiler.js +2 -0
  14. data/lib/html/share.html +0 -1
  15. data/lib/html/speedscope/LICENSE +21 -0
  16. data/lib/html/speedscope/README.md +3 -0
  17. data/lib/html/speedscope/demangle-cpp.1768f4cc.js +4 -0
  18. data/lib/html/speedscope/favicon-16x16.f74b3187.png +0 -0
  19. data/lib/html/speedscope/favicon-32x32.bc503437.png +0 -0
  20. data/lib/html/speedscope/file-format-schema.json +324 -0
  21. data/lib/html/speedscope/fonts/source-code-pro-regular.css +8 -0
  22. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff +0 -0
  23. data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff2 +0 -0
  24. data/lib/html/speedscope/import.cf0fa83f.js +115 -0
  25. data/lib/html/speedscope/index.html +2 -0
  26. data/lib/html/speedscope/release.txt +3 -0
  27. data/lib/html/speedscope/reset.8c46b7a1.css +2 -0
  28. data/lib/html/speedscope/source-map.438fa06b.js +24 -0
  29. data/lib/html/speedscope/speedscope.44364064.js +200 -0
  30. data/lib/html/vendor.js +848 -0
  31. data/lib/mini_profiler/asset_version.rb +3 -2
  32. data/lib/mini_profiler/client_settings.rb +13 -5
  33. data/lib/mini_profiler/config.rb +43 -5
  34. data/lib/mini_profiler/gc_profiler.rb +1 -1
  35. data/lib/mini_profiler/profiler.rb +310 -42
  36. data/lib/mini_profiler/profiling_methods.rb +13 -8
  37. data/lib/mini_profiler/snapshots_transporter.rb +109 -0
  38. data/lib/mini_profiler/storage/abstract_store.rb +79 -1
  39. data/lib/mini_profiler/storage/file_store.rb +3 -3
  40. data/lib/mini_profiler/storage/memcache_store.rb +2 -0
  41. data/lib/mini_profiler/storage/memory_store.rb +54 -5
  42. data/lib/mini_profiler/storage/redis_store.rb +136 -2
  43. data/lib/mini_profiler/timer_struct/custom.rb +1 -0
  44. data/lib/mini_profiler/timer_struct/page.rb +60 -4
  45. data/lib/mini_profiler/timer_struct/request.rb +53 -11
  46. data/lib/mini_profiler/timer_struct/sql.rb +4 -2
  47. data/lib/mini_profiler/version.rb +1 -1
  48. data/lib/mini_profiler_rails/railtie.rb +88 -7
  49. data/lib/mini_profiler_rails/railtie_methods.rb +61 -0
  50. data/lib/patches/db/activerecord.rb +1 -12
  51. data/lib/patches/db/mongo.rb +1 -1
  52. data/lib/patches/db/moped.rb +1 -1
  53. data/lib/patches/db/mysql2.rb +4 -27
  54. data/lib/patches/db/mysql2/alias_method.rb +30 -0
  55. data/lib/patches/db/mysql2/prepend.rb +34 -0
  56. data/lib/patches/db/plucky.rb +4 -4
  57. data/lib/patches/net_patches.rb +18 -8
  58. data/lib/patches/sql_patches.rb +13 -5
  59. data/lib/prepend_mysql2_patch.rb +5 -0
  60. data/lib/prepend_net_http_patch.rb +5 -0
  61. data/lib/rack-mini-profiler.rb +1 -1
  62. data/rack-mini-profiler.gemspec +15 -6
  63. metadata +150 -31
  64. data/lib/html/jquery.1.7.1.js +0 -4
  65. data/lib/html/jquery.tmpl.js +0 -486
  66. data/lib/html/list.css +0 -9
  67. data/lib/html/list.js +0 -38
  68. data/lib/html/list.tmpl +0 -34
data/lib/html/list.css DELETED
@@ -1,9 +0,0 @@
1
- tbody tr:nth-child(odd) { background-color:#eee; }
2
- tbody tr:nth-child(even) { background-color:#fff; }
3
- table { border: 0; border-spacing:0;}
4
- tr {border: 0;}
5
- .date {font-size: 11px; color: #666;}
6
- td {padding: 8px;}
7
- .time {text-align:center;}
8
- thead tr {background-color: #bbb; color: #444; font-size: 12px;}
9
- thead tr th { padding: 5px 15px;}
data/lib/html/list.js DELETED
@@ -1,38 +0,0 @@
1
- var MiniProfiler = MiniProfiler || {};
2
- MiniProfiler.list = {
3
- init:
4
- function (options) {
5
- var $ = MiniProfiler.jQuery;
6
- var opt = options || {};
7
-
8
- var updateGrid = function (id) {
9
- $.ajax({
10
- url: options.path + 'results-list',
11
- data: { "last-id": id },
12
- dataType: 'json',
13
- type: 'GET',
14
- success: function (data) {
15
- $('table tbody').append($("#rowTemplate").tmpl(data));
16
- var oldId = id;
17
- var oldData = data;
18
- setTimeout(function () {
19
- var newId = oldId;
20
- if (oldData.length > 0) {
21
- newId = oldData[oldData.length - 1].Id;
22
- }
23
- updateGrid(newId);
24
- }, 4000);
25
- }
26
- });
27
- }
28
-
29
- MiniProfiler.path = options.path;
30
- $.get(options.path + 'list.tmpl?v=' + options.version, function (data) {
31
- if (data) {
32
- $('body').append(data);
33
- $('body').append($('#tableTemplate').tmpl());
34
- updateGrid();
35
- }
36
- });
37
- }
38
- };
data/lib/html/list.tmpl DELETED
@@ -1,34 +0,0 @@
1
- <script id="tableTemplate" type="text/x-jquery-tmpl">
2
- <table>
3
- <thead>
4
- <tr>
5
- <th>Name</th>
6
- <th>Started</th>
7
- <th>Sql Duration</th>
8
- <th>Total Duration</th>
9
- <th>Request Start</th>
10
- <th>Response Start</th>
11
- <th>Dom Complete</th>
12
- </tr>
13
- </thead>
14
- <tbody>
15
-
16
- </tbody>
17
- </table>
18
- </script>
19
- <script id="rowTemplate" type="text/x-jquery-tmpl">
20
- <tr>
21
- <td>
22
- <a href="${MiniProfiler.path}results?id=${id}">${name}</a></td>
23
- <td class="date">${MiniProfiler.renderDate(started)}</td>
24
- <td class="time">${duration_milliseconds_in_sql}</td>
25
- <td class="time">${duration_milliseconds}</td>
26
- {{if client_timings}}
27
- <td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Request").start}</td>
28
- <td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Response").start}</td>
29
- <td class="time">${MiniProfiler.getClientTimingByName(client_timings,"Dom Complete").start}</td>
30
- {{else}}
31
- <td colspan="3"></td>
32
- {{/if}}
33
- </tr>
34
- </script>