rack-mini-profiler 1.0.2 → 3.1.1
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 +145 -21
- data/README.md +201 -94
- data/lib/enable_rails_patches.rb +5 -0
- data/lib/generators/rack_mini_profiler/USAGE +9 -0
- data/lib/generators/rack_mini_profiler/install_generator.rb +13 -0
- data/lib/generators/{rack_profiler/templates/rack_profiler.rb → rack_mini_profiler/templates/rack_mini_profiler.rb} +1 -1
- data/lib/generators/rack_profiler/install_generator.rb +6 -3
- data/lib/html/dot.1.1.2.min.js +2 -0
- data/lib/html/includes.css +144 -45
- data/lib/html/includes.js +1420 -1009
- data/lib/html/includes.scss +538 -441
- data/lib/html/includes.tmpl +231 -148
- data/lib/html/pretty-print.js +810 -0
- data/lib/html/profile_handler.js +1 -1
- data/lib/html/rack-mini-profiler.css +3 -0
- data/lib/html/rack-mini-profiler.js +2 -0
- data/lib/html/share.html +0 -1
- data/lib/html/speedscope/LICENSE +21 -0
- data/lib/html/speedscope/README.md +3 -0
- data/lib/html/speedscope/demangle-cpp.1768f4cc.js +4 -0
- data/lib/html/speedscope/favicon-16x16.f74b3187.png +0 -0
- data/lib/html/speedscope/favicon-32x32.bc503437.png +0 -0
- data/lib/html/speedscope/file-format-schema.json +324 -0
- data/lib/html/speedscope/fonts/source-code-pro-regular.css +8 -0
- data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff +0 -0
- data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff2 +0 -0
- data/lib/html/speedscope/import.cf0fa83f.js +115 -0
- data/lib/html/speedscope/index.html +2 -0
- data/lib/html/speedscope/release.txt +3 -0
- data/lib/html/speedscope/reset.8c46b7a1.css +2 -0
- data/lib/html/speedscope/source-map.438fa06b.js +24 -0
- data/lib/html/speedscope/speedscope.44364064.js +200 -0
- data/lib/html/vendor.js +848 -0
- data/lib/mini_profiler/asset_version.rb +3 -2
- data/lib/mini_profiler/client_settings.rb +15 -7
- data/lib/mini_profiler/config.rb +51 -5
- data/lib/mini_profiler/gc_profiler.rb +1 -1
- data/lib/mini_profiler/profiling_methods.rb +13 -8
- data/lib/mini_profiler/snapshots_transporter.rb +109 -0
- data/lib/mini_profiler/storage/abstract_store.rb +52 -1
- data/lib/mini_profiler/storage/file_store.rb +7 -3
- data/lib/mini_profiler/storage/memcache_store.rb +13 -7
- data/lib/mini_profiler/storage/memory_store.rb +100 -7
- data/lib/mini_profiler/storage/redis_store.rb +226 -3
- data/lib/mini_profiler/storage.rb +7 -0
- data/lib/mini_profiler/timer_struct/base.rb +2 -0
- data/lib/mini_profiler/timer_struct/custom.rb +1 -0
- data/lib/mini_profiler/timer_struct/page.rb +60 -4
- data/lib/mini_profiler/timer_struct/request.rb +53 -11
- data/lib/mini_profiler/timer_struct/sql.rb +6 -2
- data/lib/mini_profiler/timer_struct.rb +8 -0
- data/lib/mini_profiler/version.rb +2 -1
- data/lib/{mini_profiler/profiler.rb → mini_profiler.rb} +400 -83
- data/lib/mini_profiler_rails/railtie.rb +89 -7
- data/lib/mini_profiler_rails/railtie_methods.rb +61 -0
- data/lib/patches/db/activerecord.rb +1 -12
- data/lib/patches/db/mongo.rb +1 -1
- data/lib/patches/db/moped.rb +1 -1
- data/lib/patches/db/mysql2/alias_method.rb +30 -0
- data/lib/patches/db/mysql2/prepend.rb +34 -0
- data/lib/patches/db/mysql2.rb +4 -27
- data/lib/patches/db/plucky.rb +4 -4
- data/lib/patches/db/riak.rb +1 -1
- data/lib/patches/net_patches.rb +21 -10
- data/lib/patches/sql_patches.rb +13 -5
- data/lib/prepend_mysql2_patch.rb +5 -0
- data/lib/prepend_net_http_patch.rb +5 -0
- data/lib/rack-mini-profiler.rb +1 -24
- data/rack-mini-profiler.gemspec +17 -8
- metadata +156 -32
- data/lib/html/jquery.1.7.1.js +0 -4
- data/lib/html/jquery.tmpl.js +0 -486
- data/lib/html/list.css +0 -9
- data/lib/html/list.js +0 -38
- data/lib/html/list.tmpl +0 -34
data/lib/html/includes.tmpl
CHANGED
@@ -1,228 +1,311 @@
|
|
1
|
-
<script id="profilerTemplate" type="text/x-
|
2
|
-
|
1
|
+
<script id="profilerTemplate" type="text/x-dot-tmpl">
|
3
2
|
<div class="profiler-result">
|
4
|
-
|
5
|
-
|
6
|
-
{{if has_duplicate_sql_timings}}<span class="profiler-nuclear">!</span>{{/if}}
|
7
|
-
<span class="profiler-number">
|
8
|
-
${MiniProfiler.formatDuration(duration_milliseconds)} <span class="profiler-unit">ms</span>
|
9
|
-
</span>
|
10
|
-
{{if MiniProfiler.showTotalSqlCount()}}
|
3
|
+
<div class="profiler-button {{? it.has_duplicate_sql_timings}}profiler-warning{{?}}">
|
4
|
+
{{? it.has_duplicate_sql_timings}}<span class="profiler-nuclear">!</span>{{?}}
|
11
5
|
<span class="profiler-number">
|
12
|
-
|
6
|
+
{{= MiniProfiler.formatDuration(it.duration_milliseconds)}} <span class="profiler-unit">ms</span>
|
13
7
|
</span>
|
14
|
-
{{
|
8
|
+
{{? MiniProfiler.showTotalSqlCount()}}
|
9
|
+
<span class="profiler-number">
|
10
|
+
{{= it.sql_count}} <span class="profiler-unit">sql</span>
|
11
|
+
</span>
|
12
|
+
{{?}}
|
15
13
|
</div>
|
16
14
|
|
17
15
|
<div class="profiler-popup">
|
18
16
|
<div class="profiler-info">
|
19
17
|
<span class="profiler-name">
|
20
|
-
|
18
|
+
{{= it.name}} <span class="profiler-overall-duration">({{= MiniProfiler.formatDuration(it.duration_milliseconds)}} ms)</span>
|
21
19
|
</span>
|
22
|
-
<span class="profiler-server-time"
|
20
|
+
<span class="profiler-server-time">{{= it.machine_name}} on {{= MiniProfiler.renderDate(it.started_formatted)}}</span>
|
23
21
|
</div>
|
24
22
|
<div class="profiler-output">
|
25
23
|
<table class="profiler-timings">
|
26
24
|
<thead>
|
27
25
|
<tr>
|
28
|
-
<th
|
26
|
+
<th>event</th>
|
29
27
|
<th>duration (ms)</th>
|
30
28
|
<th class="profiler-duration-with-children">with children (ms)</th>
|
31
29
|
<th class="time-from-start">from start (ms)</th>
|
32
|
-
{{
|
30
|
+
{{? it.has_sql_timings}}
|
33
31
|
<th colspan="2">query time (ms)</th>
|
34
|
-
{{
|
35
|
-
{{
|
36
|
-
<th colspan="2"
|
37
|
-
{{
|
32
|
+
{{?}}
|
33
|
+
{{~ it.custom_timing_names :value}}
|
34
|
+
<th colspan="2">{{= value.toLowerCase() }} (ms)</th>
|
35
|
+
{{~}}
|
38
36
|
</tr>
|
39
37
|
</thead>
|
40
38
|
<tbody>
|
41
|
-
{{
|
39
|
+
{{= MiniProfiler.templates.timingTemplate({timing: it.root, page: it}) }}
|
42
40
|
</tbody>
|
43
41
|
<tfoot>
|
44
42
|
<tr>
|
45
43
|
<td colspan="3">
|
46
|
-
{{
|
47
|
-
|
48
|
-
{{
|
44
|
+
{{? !it.client_timings}}
|
45
|
+
{{= MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) }}
|
46
|
+
{{?}}
|
49
47
|
<a class="profiler-toggle-duration-with-children" title="toggles column with aggregate child durations">show time with children</a>
|
48
|
+
<a
|
49
|
+
class="profiler-snapshots-page-link"
|
50
|
+
title="Go to snapshots page"
|
51
|
+
href="{{= MiniProfiler.options.path }}snapshots">snapshots</a>
|
50
52
|
</td>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
53
|
+
{{? it.has_sql_timings}}
|
54
|
+
<td colspan="2" class="profiler-number profiler-percent-in-sql" title="{{= MiniProfiler.getSqlTimingsCount(it.root) }} queries spent {{= MiniProfiler.formatDuration(it.duration_milliseconds_in_sql) }} ms of total request time">
|
55
|
+
{{= MiniProfiler.formatDuration(it.duration_milliseconds_in_sql / it.duration_milliseconds * 100) }}
|
56
|
+
<span class="profiler-unit">% in sql</span>
|
57
|
+
</td>
|
58
|
+
{{?}}
|
59
|
+
{{~ it.custom_timing_names :value}}
|
60
|
+
<td colspan="2" class="profiler-number profiler-percentage-in-sql" title="{{= it.custom_timing_stats[value].count }} {{= value.toLowerCase() }} invocations spent {{= MiniProfiler.formatDuration(it.custom_timing_stats[value].duration) }} ms of total request time">
|
61
|
+
{{= MiniProfiler.formatDuration(it.custom_timing_stats[value].duration / it.duration_milliseconds * 100) }}
|
62
|
+
<span class="profiler-unit">% in {{= value.toLowerCase() }}</span>
|
63
|
+
</td>
|
64
|
+
{{~}}
|
63
65
|
</tr>
|
64
66
|
</tfoot>
|
65
67
|
</table>
|
66
|
-
{{
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
68
|
+
{{? it.client_timings}}
|
69
|
+
<table class="profiler-timings profiler-client-timings">
|
70
|
+
<thead>
|
71
|
+
<tr>
|
72
|
+
<th>client event</th>
|
73
|
+
<th>duration (ms)</th>
|
74
|
+
<th>from start (ms)</th>
|
75
|
+
</tr>
|
76
|
+
</thead>
|
77
|
+
<tbody>
|
78
|
+
{{~ MiniProfiler.getClientTimings(it.client_timings) :value}}
|
79
|
+
<tr class="{{? value.isTrivial }}profiler-trivial{{?}}">
|
80
|
+
<td class="profiler-label">{{= value.name }}</td>
|
81
|
+
<td class="profiler-duration">
|
82
|
+
{{? value.duration >= 0}}
|
83
|
+
<span class="profiler-unit"></span>{{= MiniProfiler.formatDuration(value.duration) }}
|
84
|
+
{{?}}
|
85
|
+
</td>
|
86
|
+
<td class="profiler-duration time-from-start">
|
87
|
+
<span class="profiler-unit">+</span>{{= MiniProfiler.formatDuration(value.start) }}
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
{{~}}
|
91
|
+
</tbody>
|
92
|
+
<tfoot>
|
93
|
+
<td colspan="3">
|
94
|
+
{{= MiniProfiler.templates.linksTemplate({timing: it.root, page: it}) }}
|
86
95
|
</td>
|
87
|
-
</
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
96
|
+
</tfoot>
|
97
|
+
</table>
|
98
|
+
{{?}}
|
99
|
+
{{? it.custom_fields && Object.keys(it.custom_fields).length > 0 }}
|
100
|
+
<p class="custom-fields-title">Snapshot custom fields</p>
|
101
|
+
<table class="profiler-timings">
|
102
|
+
<tbody>
|
103
|
+
{{~ Object.keys(it.custom_fields) :key }}
|
104
|
+
<tr>
|
105
|
+
<td class="profiler-label">{{= key }}</td>
|
106
|
+
<td class="profiler-label">{{= it.custom_fields[key] }}</td>
|
107
|
+
</tr>
|
108
|
+
{{~}}
|
109
|
+
</tbody>
|
110
|
+
</table>
|
111
|
+
{{?}}
|
97
112
|
</div>
|
98
113
|
</div>
|
99
114
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
115
|
+
{{? it.has_sql_timings}}
|
116
|
+
<div class="profiler-queries">
|
117
|
+
<table>
|
118
|
+
<thead>
|
119
|
+
<tr>
|
120
|
+
<th class="ta-right">step<br />time from start<br />query type<br />duration</th>
|
121
|
+
<th class="ta-left">call stack<br />query</th>
|
122
|
+
</tr>
|
123
|
+
</thead>
|
124
|
+
<tbody>
|
125
|
+
{{~ MiniProfiler.getSqlTimings(it.root) :value:index}}
|
126
|
+
{{= MiniProfiler.templates.sqlGapTemplate({g: value.prevGap}) }}
|
127
|
+
{{= MiniProfiler.templates.sqlTimingTemplate({i: index, s: value}) }}
|
128
|
+
{{? value.nextGap}}
|
129
|
+
{{= MiniProfiler.templates.sqlGapTemplate({g: value.nextGap}) }}
|
130
|
+
{{?}}
|
131
|
+
{{~}}
|
132
|
+
</tbody>
|
133
|
+
</table>
|
134
|
+
<p class="profiler-trivial-gap-container">
|
135
|
+
<a class="profiler-toggle-trivial-gaps">show trivial gaps</a>
|
136
|
+
</p>
|
137
|
+
</div>
|
138
|
+
{{?}}
|
125
139
|
</div>
|
126
|
-
|
127
140
|
</script>
|
128
141
|
|
129
|
-
<script id="linksTemplate" type="text/x-
|
130
|
-
<a href="
|
131
|
-
<a href="
|
132
|
-
{{
|
133
|
-
|
134
|
-
{{
|
135
|
-
{{
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
142
|
+
<script id="linksTemplate" type="text/x-dot-tmpl">
|
143
|
+
<a href="{{= MiniProfiler.shareUrl(it.page.id) }}" class="profiler-share-profiler-results" target="_blank">share</a>
|
144
|
+
<a href="{{= MiniProfiler.moreUrl(it.page.name) }}" class="profiler-more-actions">more</a>
|
145
|
+
{{? it.page.has_flamegraph}}
|
146
|
+
<a href="{{= MiniProfiler.flamegraphUrl(it.page.id) }}" class="profiler-show-flamegraph" target="_blank">flamegraph</a>
|
147
|
+
{{?}}
|
148
|
+
{{? it.custom_link}}
|
149
|
+
<a href="{{= it.custom_link }}" class="profiler-custom-link" target="_blank">{{= it.custom_link_name }}</a>
|
150
|
+
{{?}}
|
151
|
+
{{? it.page.has_trivial_timings}}
|
152
|
+
<a class="profiler-toggle-trivial" data-show-on-load="{{= it.page.has_all_trivial_timings }}" title="toggles any rows with < {{= it.page.trivial_duration_threshold_milliseconds }} ms">
|
153
|
+
show trivial
|
154
|
+
</a>
|
155
|
+
{{?}}
|
140
156
|
</script>
|
141
157
|
|
142
|
-
<script id="timingTemplate" type="text/x-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
<span class="profiler-indent">${MiniProfiler.renderIndent(timing.depth)}</span> ${timing.name.slice(0,45)}{{if timing.name && timing.name.length > 45 }}...{{/if}}
|
158
|
+
<script id="timingTemplate" type="text/x-dot-tmpl">
|
159
|
+
<tr class="{{? it.timing.is_trivial }}profiler-trivial{{?}}" data-timing-id="{{= it.timing.id }}">
|
160
|
+
<td class="profiler-label" title="{{? it.timing.name && it.timing.name.length > 45 }}{{= it.timing.name }}{{?}}">
|
161
|
+
<span class="profiler-indent">{{= MiniProfiler.renderIndent(it.timing.depth) }}</span> {{= it.timing.name.slice(0,45) }}{{? it.timing.name && it.timing.name.length > 45 }}...{{?}}
|
147
162
|
</td>
|
148
163
|
<td class="profiler-duration" title="duration of this step without any children's durations">
|
149
|
-
|
164
|
+
{{= MiniProfiler.formatDuration(it.timing.duration_without_children_milliseconds) }}
|
150
165
|
</td>
|
151
166
|
<td class="profiler-duration profiler-duration-with-children" title="duration of this step and its children">
|
152
|
-
|
167
|
+
{{= MiniProfiler.formatDuration(it.timing.duration_milliseconds) }}
|
153
168
|
</td>
|
154
169
|
<td class="profiler-duration time-from-start" title="time elapsed since profiling started">
|
155
|
-
<span class="profiler-unit">+</span
|
170
|
+
<span class="profiler-unit">+</span>{{= MiniProfiler.formatDuration(it.timing.start_milliseconds) }}
|
156
171
|
</td>
|
157
172
|
|
158
|
-
{{
|
159
|
-
<td class="profiler-duration {{
|
173
|
+
{{? it.timing.has_sql_timings}}
|
174
|
+
<td class="profiler-duration {{? it.timing.has_duplicate_sql_timings}}profiler-warning{{?}}" title="{{? it.timing.has_duplicate_sql_timings}}duplicate queries detected - {{?}}{{? it.timing.executed_readers > 0 || it.timing.executed_scalars > 0 || it.timing.executed_non_queries > 0}}{{= it.timing.executed_readers }} reader, {{= it.timing.executed_scalars }} scalar, {{= it.timing.executed_non_queries }} non-query statements executed{{?}}">
|
160
175
|
<a class="profiler-queries-show">
|
161
|
-
{{
|
162
|
-
|
176
|
+
{{? it.timing.has_duplicate_sql_timings}}<span class="profiler-nuclear">!</span>{{?}}
|
177
|
+
{{= it.timing.sql_timings.length }} <span class="profiler-unit">sql</span>
|
163
178
|
</a>
|
164
179
|
</td>
|
165
180
|
<td class="profiler-duration" title="aggregate duration of all queries in this step (excludes children)">
|
166
|
-
|
181
|
+
{{= MiniProfiler.formatDuration(it.timing.sql_timings_duration_milliseconds) }}
|
167
182
|
</td>
|
168
|
-
{{
|
183
|
+
{{??}}
|
169
184
|
<td colspan="2"></td>
|
170
|
-
{{
|
185
|
+
{{?}}
|
171
186
|
|
172
|
-
{{
|
173
|
-
{{
|
174
|
-
<td class="profiler-duration" title="aggregate number of all
|
175
|
-
|
187
|
+
{{~ it.page.custom_timing_names :value}}
|
188
|
+
{{? it.timing.custom_timings && it.timing.custom_timings[value]}}
|
189
|
+
<td class="profiler-duration" title="aggregate number of all {{= value.toLowerCase() }} invocations in this step (excludes children)">
|
190
|
+
{{= it.timing.custom_timings[value].length }} {{= value.toLowerCase() }}
|
176
191
|
</td>
|
177
|
-
<td class="profiler-duration" title="aggregate duration of all
|
178
|
-
|
192
|
+
<td class="profiler-duration" title="aggregate duration of all {{= value.toLowerCase() }} invocations in this step (excludes children)">
|
193
|
+
{{= MiniProfiler.formatDuration(it.timing.custom_timing_stats[value].duration) }}
|
179
194
|
</td>
|
180
|
-
{{
|
195
|
+
{{??}}
|
181
196
|
<td colspan="2"></td>
|
182
|
-
{{
|
183
|
-
{{
|
197
|
+
{{?}}
|
198
|
+
{{~}}
|
184
199
|
|
185
200
|
</tr>
|
186
201
|
|
187
|
-
{{
|
188
|
-
{{
|
189
|
-
{{
|
190
|
-
{{
|
191
|
-
{{
|
192
|
-
|
202
|
+
{{? it.timing.has_children}}
|
203
|
+
{{~ it.timing.children :value}}
|
204
|
+
{{= MiniProfiler.templates.timingTemplate({timing: value, page: it.page}) }}
|
205
|
+
{{~}}
|
206
|
+
{{?}}
|
193
207
|
</script>
|
194
208
|
|
195
|
-
<script id="sqlTimingTemplate" type="text/x-
|
196
|
-
|
197
|
-
<tr class="${s.row_class}" data-timing-id="${s.parent_timing_id}">
|
209
|
+
<script id="sqlTimingTemplate" type="text/x-dot-tmpl">
|
210
|
+
<tr class="{{= it.s.row_class || '' }}" data-timing-id="{{= it.s.parent_timing_id }}">
|
198
211
|
<td class="profiler-info">
|
199
|
-
<div
|
200
|
-
<div class="profiler-number"><span class="profiler-unit">T+</span
|
212
|
+
<div>{{= it.s.parent_timing_name }}</div>
|
213
|
+
<div class="profiler-number"><span class="profiler-unit">T+</span>{{= MiniProfiler.formatDuration(it.s.start_milliseconds) }} <span class="profiler-unit">ms</span></div>
|
201
214
|
<div>
|
202
|
-
{{
|
203
|
-
|
215
|
+
{{? it.s.is_duplicate}}<span class="profiler-warning">DUPLICATE</span>{{?}}
|
216
|
+
{{= MiniProfiler.renderExecuteType(it.s.execute_type) }}
|
204
217
|
</div>
|
205
|
-
<div title="{{
|
218
|
+
<div title="{{? it.s.execute_type == 3}}first result fetched: {{= it.s.first_fetch_duration_milliseconds }}ms{{?}}">{{= MiniProfiler.formatDuration(it.s.duration_milliseconds) }} <span class="profiler-unit">ms</span></div>
|
206
219
|
</td>
|
207
220
|
<td>
|
208
221
|
<div class="query">
|
209
|
-
<pre class="profiler-stack-trace"
|
210
|
-
|
222
|
+
<pre class="profiler-stack-trace">{{= it.s.stack_trace_snippet }}</pre>
|
223
|
+
{{? it.s.formatted_command_string}}
|
224
|
+
<pre class="prettyprint lang-sql"><code>{{= it.s.formatted_command_string }}; {{= MiniProfiler.formatParameters(it.s.parameters) }}</code></pre>
|
225
|
+
{{??}}
|
226
|
+
<i>Query redacted</i>
|
227
|
+
{{?}}
|
211
228
|
</div>
|
212
229
|
</td>
|
213
230
|
</tr>
|
214
|
-
|
215
231
|
</script>
|
216
232
|
|
217
|
-
<script id="sqlGapTemplate" type="text/x-
|
218
|
-
|
219
|
-
<tr class="profiler-gap-info{{if g.duration < 4}} profiler-trivial-gaps{{/if}}">
|
233
|
+
<script id="sqlGapTemplate" type="text/x-dot-tmpl">
|
234
|
+
<tr class="profiler-gap-info{{? it.g.duration < 4}} profiler-trivial-gaps{{?}}">
|
220
235
|
<td class="profiler-info">
|
221
|
-
|
236
|
+
{{= it.g.duration }} <span class="profiler-unit">ms</span>
|
222
237
|
</td>
|
223
238
|
<td class="query">
|
224
|
-
<div
|
239
|
+
<div>{{= it.g.topReason.name }} — {{= it.g.topReason.duration.toFixed(2) }} <span class="profiler-unit">ms</span></div>
|
225
240
|
</td>
|
226
241
|
</tr>
|
242
|
+
</script>
|
243
|
+
|
244
|
+
<script id="snapshotsGroupsList" type="text/x-dot-tmpl">
|
245
|
+
{{? it.list && it.list.length }}
|
246
|
+
<table class="snapshots-table">
|
247
|
+
<thead>
|
248
|
+
<tr>
|
249
|
+
<th>Requests Group</th>
|
250
|
+
<th>Worst Time (ms)</th>
|
251
|
+
<th>Best Time (ms)</th>
|
252
|
+
<th>No. of Snapshots</th>
|
253
|
+
</tr>
|
254
|
+
</thead>
|
255
|
+
<tbody>
|
256
|
+
{{~ it.list :row}}
|
257
|
+
<tr>
|
258
|
+
<td class="request-group"><a href="{{= row.url }}">{{= row.name }}</a></td>
|
259
|
+
<td>{{= MiniProfiler.formatDuration(row.worst_score) }}</td>
|
260
|
+
<td>{{= MiniProfiler.formatDuration(row.best_score) }}</td>
|
261
|
+
<td>{{= row.snapshots_count }}</td>
|
262
|
+
</tr>
|
263
|
+
{{~}}
|
264
|
+
</tbody>
|
265
|
+
</table>
|
266
|
+
{{??}}
|
267
|
+
<h2>No snapshots exist</h2>
|
268
|
+
{{?}}
|
269
|
+
</script>
|
227
270
|
|
271
|
+
<script id="snapshotsList" type="text/x-dot-tmpl">
|
272
|
+
{{ var data = it.data; }}
|
273
|
+
{{ var customFieldsNames = it.allCustomFieldsNames; }}
|
274
|
+
{{? data.list && data.list.length }}
|
275
|
+
<h2>Snapshots for {{= data.group_name }}</h2>
|
276
|
+
<table class="snapshots-table">
|
277
|
+
<thead>
|
278
|
+
<tr>
|
279
|
+
<th>ID</th>
|
280
|
+
<th>Duration (ms)</th>
|
281
|
+
<th>SQL Count</th>
|
282
|
+
{{~ customFieldsNames :name }}
|
283
|
+
<th>{{= name }}</th>
|
284
|
+
{{~}}
|
285
|
+
<th>Age</th>
|
286
|
+
</tr>
|
287
|
+
</thead>
|
288
|
+
<tbody>
|
289
|
+
{{~ data.list :row}}
|
290
|
+
<tr>
|
291
|
+
<td><a href="{{= row.url }}">
|
292
|
+
{{= row.id }}
|
293
|
+
</a></td>
|
294
|
+
<td>{{= MiniProfiler.formatDuration(row.duration) }}</td>
|
295
|
+
<td>{{= row.sql_count }}</td>
|
296
|
+
{{~ customFieldsNames :name }}
|
297
|
+
<td>{{= row.custom_fields[name] || "" }}</td>
|
298
|
+
{{~}}
|
299
|
+
<td>
|
300
|
+
{{? row.timestamp }}
|
301
|
+
{{= MiniProfiler.timestampToRelative(row.timestamp) }}
|
302
|
+
{{?}}
|
303
|
+
</td>
|
304
|
+
</tr>
|
305
|
+
{{~}}
|
306
|
+
</tbody>
|
307
|
+
</table>
|
308
|
+
{{??}}
|
309
|
+
<h2>No snapshots for {{= data.group_name }}</h2>
|
310
|
+
{{?}}
|
228
311
|
</script>
|