|
16 | 16 | {% endif %} |
17 | 17 |
|
18 | 18 | {% block toolbar %} |
19 | | - {% set total_time = collector.events|length ? '%.0f ms'|format(collector.totaltime) : 'n/a' %} |
| 19 | + {% set duration = collector.events|length ? '%.0f ms'|format(collector.duration) : 'n/a' %} |
20 | 20 | {% set icon %} |
21 | 21 | <img width="16" height="28" alt="Time" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAABqUlEQVR42t2Vv0sCYRyHX9OmEhsMx/YKGlwLQ69DTEUSBJEQEy5J3FRc/BsuiFqEIIcQIRo6ysUhoaBBWhoaGoJwiMJLglRKrs8bXgienmkQdPDAwX2f57j3fhFJkkbiPwTK5bIiFoul3kmPud8MqKMewDXpwuGww+12n9hsNhFnlijYf/Z4PDmO45Yxo+10ZFGTyWRMEItU6AdCx7lczkgd6n7J2Wx2xm63P6jJMk6n80YQBBN1aUDv9XqvlAbbm2LE7/cLODRB0un0VveAeoDC8/waCQQC18MGQqHQOcEKvw8bcLlcL6TfYnVtCrGRAlartUUYhmn1jKg/E3USjUYfhw3E4/F7ks/nz4YNFIvFQ/ogbUYikdefyqlU6gnuOg2YK5XKvs/n+xhUDgaDTVEUt+HO04ABOBA5isViDTU5kUi81Wq1AzhWMEkDGmAEq2C3UCjcYXGauDvfEsuyUjKZbJRKpVvM8IABU9SVX+cxYABmwIE9cFqtVi9xtgvsC2AHbIAFoKey0gdlHEyDObAEWLACFsEsMALdIJ80+dK0bTS95v7+v/AJnis0eO906QwAAAAASUVORK5CYII="/> |
22 | | - <span>{{ total_time }}</span> |
| 22 | + <span>{{ duration }}</span> |
23 | 23 | {% endset %} |
24 | 24 | {% set text %} |
25 | 25 | <div class="sf-toolbar-info-piece"> |
26 | 26 | <b>Total time</b> |
27 | | - <span>{{ total_time }}</span> |
| 27 | + <span>{{ duration }}</span> |
28 | 28 | </div> |
29 | 29 | {% endset %} |
30 | 30 | {% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %} |
|
54 | 54 | <table> |
55 | 55 | <tr> |
56 | 56 | <th style="width: 20%">Total time</th> |
57 | | - <td>{{ '%.0f'|format(collector.totaltime) }} ms</td> |
| 57 | + <td>{{ '%.0f'|format(collector.duration) }} ms</td> |
58 | 58 | </tr> |
59 | 59 | <tr> |
60 | 60 | <th>Initialization time</th> |
|
70 | 70 | <h3> |
71 | 71 | {{ profile.parent ? "Request" : "Main Request" }} |
72 | 72 | <small> |
73 | | - - {{ collector.events.__section__.totaltime }} ms |
| 73 | + - {{ collector.events.__section__.duration }} ms |
74 | 74 | {% if profile.parent %} |
75 | 75 | - <a href="{{ path('_profiler', { 'token': profile.parent.token, 'panel': 'time' }) }}">parent</a> |
76 | 76 | {% endif %} |
|
86 | 86 | {% set events = child.getcollector('time').events %} |
87 | 87 | <h3> |
88 | 88 | Sub-request "<a href="{{ path('_profiler', { 'token': child.token, 'panel': 'time' }) }}">{{ child.getcollector('request').requestattributes.get('_controller') }}</a>" |
89 | | - <small> - {{ events.__section__.totaltime }} ms</small> |
| 89 | + <small> - {{ events.__section__.duration }} ms</small> |
90 | 90 | </h3> |
91 | 91 |
|
92 | 92 | {{ display_timeline('timeline_' ~ child.token, events, colors) }} |
|
198 | 198 |
|
199 | 199 | // Filter events whose total time is below the threshold. |
200 | 200 | drawableEvents = request.events.filter(function(event) { |
201 | | - return event.totaltime >= threshold; |
| 201 | + return event.duration >= threshold; |
202 | 202 | }); |
203 | 203 |
|
204 | 204 | canvasHeight += gapPerEvent * drawableEvents.length; |
|
315 | 315 | ctx.fillStyle = "#444"; |
316 | 316 | ctx.font = "12px sans-serif"; |
317 | 317 | text = event.name; |
318 | | - ms = " ~ " + (event.totaltime < 1 ? event.totaltime : parseInt(event.totaltime, 10)) + " ms / ~ " + event.memory + " MB"; |
| 318 | + ms = " ~ " + (event.duration < 1 ? event.duration : parseInt(event.duration, 10)) + " ms / ~ " + event.memory + " MB"; |
319 | 319 | if (x + event.starttime * ratio + ctx.measureText(text + ms).width > width) { |
320 | 320 | ctx.textAlign = "end"; |
321 | 321 | ctx.font = "10px sans-serif"; |
|
453 | 453 | "origin": {{ "%F"|format(event.origin) }}, |
454 | 454 | "starttime": {{ "%F"|format(event.starttime) }}, |
455 | 455 | "endtime": {{ "%F"|format(event.endtime) }}, |
456 | | - "totaltime": {{ "%F"|format(event.totaltime) }}, |
457 | | - "memory": {{ "%.1f"|format(event.memory / 1024 / 1024) }}, |
| 456 | + "duration": {{ "%F"|format(event.duration) }}, |
| 457 | + "memory": {{ "%.1F"|format(event.memory / 1024 / 1024) }}, |
458 | 458 | "periods": [ |
459 | 459 | {%- for period in event.periods -%} |
460 | 460 | {"start": {{ "%F"|format(period.starttime) }}, "end": {{ "%F"|format(period.endtime) }}}{{ loop.last ? '' : ', ' }} |
|
0 commit comments