/parivartree260614/parivartree/app/cache/dev/twig/fd/5d/89a26ff7de31f05f73105be54480ea3fcc75ae9babf1a3aff0b0591c4d68.php
PHP | 837 lines | 622 code | 97 blank | 118 comment | 39 complexity | e1bb4718d5651ba24a10f30622943753 MD5 | raw file
- <?php
- /* WebProfilerBundle:Collector:time.html.twig */
- class __TwigTemplate_fd5d89a26ff7de31f05f73105be54480ea3fcc75ae9babf1a3aff0b0591c4d68 extends Twig_Template
- {
- public function __construct(Twig_Environment $env)
- {
- parent::__construct($env);
- $this->parent = $this->env->loadTemplate("@WebProfiler/Profiler/layout.html.twig");
- $this->blocks = array(
- 'toolbar' => array($this, 'block_toolbar'),
- 'menu' => array($this, 'block_menu'),
- 'panel' => array($this, 'block_panel'),
- 'panelContent' => array($this, 'block_panelContent'),
- );
- }
- protected function doGetParent(array $context)
- {
- return "@WebProfiler/Profiler/layout.html.twig";
- }
- protected function doDisplay(array $context, array $blocks = array())
- {
- // line 3
- $context["__internal_73f281c4dc109eb828f42c473ab7a4162ecb9416a00239915790be94adb81cae"] = $this;
- // line 5
- if ((!array_key_exists("colors", $context))) {
- // line 6
- $context["colors"] = array("default" => "#aacd4e", "section" => "#666", "event_listener" => "#3dd", "event_listener_loading" => "#add", "template" => "#dd3", "doctrine" => "#d3d", "propel" => "#f4d", "child_sections" => "#eed");
- }
- $this->parent->display($context, array_merge($this->blocks, $blocks));
- }
- // line 18
- public function block_toolbar($context, array $blocks = array())
- {
- // line 19
- echo " ";
- $context["duration"] = ((twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "events"))) ? (sprintf("%.0f ms", $this->getAttribute($this->getContext($context, "collector"), "duration"))) : ("n/a"));
- // line 20
- echo " ";
- ob_start();
- // line 21
- echo " <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=\" />
- <span>";
- // line 22
- echo twig_escape_filter($this->env, $this->getContext($context, "duration"), "html", null, true);
- echo "</span>
- ";
- $context["icon"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- // line 24
- echo " ";
- ob_start();
- // line 25
- echo " <div class=\"sf-toolbar-info-piece\">
- <b>Total time</b>
- <span>";
- // line 27
- echo twig_escape_filter($this->env, $this->getContext($context, "duration"), "html", null, true);
- echo "</span>
- </div>
- ";
- $context["text"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- // line 30
- echo " ";
- $this->env->loadTemplate("@WebProfiler/Profiler/toolbar_item.html.twig")->display(array_merge($context, array("link" => $this->getContext($context, "profiler_url"))));
- }
- // line 33
- public function block_menu($context, array $blocks = array())
- {
- // line 34
- echo "<span class=\"label\">
- <span class=\"icon\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAhCAYAAADOHBvaAAACz0lEQVR42t2XXWhSYRjHc+pyWrC10e66qKggiGoF0Qh1SBPFDxCcX00yrG6EImFsRhAuvUjwQgZB1EUICYEkgRJGB0QmKMNGEYx1URYEg2w6amWY/YUXXH7Ms9M5RAk/PByf8/58P573ec+2Wq32V/g3xFKpdB3UQBV8JVTJvXUuxbXN+P96TODNzMzsNJvNo3UCgYCYszmmKKrPYrE4NBrNU7lcvtY8xGNjYyWtVvvEZrPZES9kQyy02+3nx8fH3xFJV5RK5RuHw2GqP8tInEgk+g0GwyN6wlZMJtPdfD6/Y0viVCo1iKHLMpM20Ov1FNqT0BWLsWhiXdImDyiQ7ybHVN1HnKibWHgNHxr5egXI6t90ej49PX0BsYKO4qWlpT1qtXqFhlhGnpHREWPaPiB2dydxL/7ZTRLMnpjg8/lcpNct4mGr1fqSK7HT6UwhfleLuFwuH1EoFBWuxDqd7jPiDzSLe+Lx+AQJYl9MKBQKZ+pb7kaxKBKJXGUgPgqCgGrQOc3S6fQEfuNvFEtisdgUA3E/kcsadE6zhYUFG9lKG2LcvMxA3EKnKUBx+bm6uqptFvcCtUql+kECWcdoNH6BQw56fltcYNTtdr/nSuzxeJbhONkujw9Fo9EYV+JkMvkAjv3txEOVSuUSytk3tqWoz2to/xwYaCcWgtPI5+dsSrGo6mn0GG2PtG6ZDYbBRb/f/5EtcSgUeos2J8HgpmURHMaQz6JglP5U6vV6P6G962Sr5HcUE/rAKXB7bm5uhenwhsPheim8BUa6HwQaSMjSv5HNZl+gstDOb5fL9X1xcTGLZ6fAMSDe6ilTBA4CO7iXyWReB4PBMo5F1WYZymkVc1nK5XKvEHsHWMA+sJ3p8VYAhkjvJ4EPRMCzYrE4XyqV5nGdBA/BLLCC46Tu8tl4kxCAAdKLE0AGzhKkZB73kqIh4PI1lQf4BB6TNn4B8KR3FN9bp4MAAAAASUVORK5CYII=\" alt=\"Timeline\"></span>
- <strong>Timeline</strong>
- </span>
- ";
- }
- // line 40
- public function block_panel($context, array $blocks = array())
- {
- // line 41
- echo " <h2>Timeline</h2>
- ";
- // line 42
- if (twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "events"))) {
- // line 43
- echo " ";
- $this->displayBlock("panelContent", $context, $blocks);
- echo "
- ";
- } else {
- // line 45
- echo " <p>
- <em>No timing events have been recorded. Are you sure that debugging is enabled in the kernel?</em>
- </p>
- ";
- }
- }
- // line 51
- public function block_panelContent($context, array $blocks = array())
- {
- // line 52
- echo " <form id=\"timeline-control\" action=\"\" method=\"get\">
- <input type=\"hidden\" name=\"panel\" value=\"time\">
- <table>
- <tr>
- <th style=\"width: 20%\">Total time</th>
- <td>";
- // line 57
- echo twig_escape_filter($this->env, sprintf("%.0f", $this->getAttribute($this->getContext($context, "collector"), "duration")), "html", null, true);
- echo " ms</td>
- </tr>
- <tr>
- <th>Initialization time</th>
- <td>";
- // line 61
- echo twig_escape_filter($this->env, sprintf("%.0f", $this->getAttribute($this->getContext($context, "collector"), "inittime")), "html", null, true);
- echo " ms</td>
- </tr>
- <tr>
- <th>Threshold</th>
- <td><input type=\"number\" size=\"3\" name=\"threshold\" value=\"1\" min=\"0\"> ms</td>
- </tr>
- </table>
- </form>
- <h3>
- ";
- // line 71
- echo (($this->getAttribute($this->getContext($context, "profile"), "parent")) ? ("Request") : ("Main Request"));
- echo "
- <small>
- - ";
- // line 73
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "collector"), "events"), "__section__"), "duration"), "html", null, true);
- echo " ms
- ";
- // line 74
- if ($this->getAttribute($this->getContext($context, "profile"), "parent")) {
- // line 75
- echo " - <a href=\"";
- echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => $this->getAttribute($this->getAttribute($this->getContext($context, "profile"), "parent"), "token"), "panel" => "time")), "html", null, true);
- echo "\">parent</a>
- ";
- }
- // line 77
- echo " </small>
- </h3>
- ";
- // line 80
- echo $context["__internal_73f281c4dc109eb828f42c473ab7a4162ecb9416a00239915790be94adb81cae"]->getdisplay_timeline(("timeline_" . $this->getContext($context, "token")), $this->getAttribute($this->getContext($context, "collector"), "events"), $this->getContext($context, "colors"));
- echo "
- ";
- // line 82
- if (twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "profile"), "children"))) {
- // line 83
- echo " ";
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "profile"), "children"));
- foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
- // line 84
- echo " ";
- $context["events"] = $this->getAttribute($this->getAttribute($this->getContext($context, "child"), "getcollector", array(0 => "time"), "method"), "events");
- // line 85
- echo " <h3>
- Sub-request \"<a href=\"";
- // line 86
- echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => $this->getAttribute($this->getContext($context, "child"), "token"), "panel" => "time")), "html", null, true);
- echo "\">";
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "child"), "getcollector", array(0 => "request"), "method"), "requestattributes"), "get", array(0 => "_controller"), "method"), "html", null, true);
- echo "</a>\"
- <small> - ";
- // line 87
- echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getContext($context, "events"), "__section__"), "duration"), "html", null, true);
- echo " ms</small>
- </h3>
- ";
- // line 90
- echo $context["__internal_73f281c4dc109eb828f42c473ab7a4162ecb9416a00239915790be94adb81cae"]->getdisplay_timeline(("timeline_" . $this->getAttribute($this->getContext($context, "child"), "token")), $this->getContext($context, "events"), $this->getContext($context, "colors"));
- echo "
- ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 92
- echo " ";
- }
- // line 93
- echo "
- <script>";
- // line 94
- echo "//<![CDATA[
- /**
- * In-memory key-value cache manager
- */
- var cache = new function() {
- \"use strict\";
- var dict = {};
- this.get = function(key) {
- return dict.hasOwnProperty(key)
- ? dict[key]
- : null;
- }
- this.set = function(key, value) {
- dict[key] = value;
- return value;
- }
- };
- /**
- * Query an element with a CSS selector.
- *
- * @param string selector a CSS-selector-compatible query string.
- *
- * @return DOMElement|null
- */
- function query(selector)
- {
- \"use strict\";
- var key = 'SELECTOR: ' + selector;
- return cache.get(key) || cache.set(key, document.querySelector(selector));
- }
- /**
- * Canvas Manager
- */
- function CanvasManager(requests, maxRequestTime) {
- \"use strict\";
- var _drawingColors = ";
- // line 136
- echo twig_jsonencode_filter($this->getContext($context, "colors"));
- echo ",
- _storagePrefix = 'timeline/',
- _threshold = 1,
- _requests = requests,
- _maxRequestTime = maxRequestTime;
- /**
- * Check whether this event is a child event.
- *
- * @return true if it is.
- */
- function isChildEvent(event)
- {
- return '__section__.child' === event.name;
- }
- /**
- * Check whether this event is categorized in 'section'.
- *
- * @return true if it is.
- */
- function isSectionEvent(event)
- {
- return 'section' === event.category;
- }
- /**
- * Get the width of the container.
- */
- function getContainerWidth()
- {
- return query('#collector-content h2').clientWidth;
- }
- /**
- * Draw one canvas.
- *
- * @param request the request object
- * @param max <subjected for removal>
- * @param threshold the threshold (lower bound) of the length of the timeline (in milliseconds).
- * @param width the width of the canvas.
- */
- this.drawOne = function(request, max, threshold, width)
- {
- \"use strict\";
- var text,
- ms,
- xc,
- drawableEvents,
- mainEvents,
- elementId = 'timeline_' + request.id,
- canvasHeight = 0,
- gapPerEvent = 38,
- colors = _drawingColors,
- space = 10.5,
- ratio = (width - space * 2) / max,
- h = space,
- x = request.left * ratio + space, // position
- canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)),
- ctx = canvas.getContext(\"2d\"),
- backingStoreRatio,
- scaleRatio,
- devicePixelRatio;
- // Filter events whose total time is below the threshold.
- drawableEvents = request.events.filter(function(event) {
- return event.duration >= threshold;
- });
- canvasHeight += gapPerEvent * drawableEvents.length;
- // For retina displays so text and boxes will be crisp
- devicePixelRatio = window.devicePixelRatio == \"undefined\" ? 1 : window.devicePixelRatio;
- backingStoreRatio = ctx.webkitBackingStorePixelRatio == \"undefined\" ? 1 : ctx.webkitBackingStorePixelRatio;
- scaleRatio = devicePixelRatio / 1;
- canvasHeight += gapPerEvent * drawableEvents.length;
- canvas.width = width * scaleRatio;
- canvas.height = canvasHeight * scaleRatio;
- canvas.style.width = width + 'px';
- canvas.style.height = canvasHeight + 'px';
- ctx.scale(scaleRatio, scaleRatio);
- ctx.textBaseline = \"middle\";
- ctx.lineWidth = 0;
- // For each event, draw a line.
- ctx.strokeStyle = \"#dfdfdf\";
- drawableEvents.forEach(function(event) {
- event.periods.forEach(function(period) {
- var timelineHeadPosition = x + period.start * ratio;
- if (isChildEvent(event)) {
- ctx.fillStyle = colors.child_sections;
- ctx.fillRect(timelineHeadPosition, 0, (period.end - period.start) * ratio, canvasHeight);
- } else if (isSectionEvent(event)) {
- var timelineTailPosition = x + period.end * ratio;
- ctx.beginPath();
- ctx.moveTo(timelineHeadPosition, 0);
- ctx.lineTo(timelineHeadPosition, canvasHeight);
- ctx.moveTo(timelineTailPosition, 0);
- ctx.lineTo(timelineTailPosition, canvasHeight);
- ctx.fill();
- ctx.closePath();
- ctx.stroke();
- }
- });
- });
- // Filter for main events.
- mainEvents = drawableEvents.filter(function(event) {
- return !isChildEvent(event)
- });
- // For each main event, draw the visual presentation of timelines.
- mainEvents.forEach(function(event) {
- h += 8;
- // For each sub event, ...
- event.periods.forEach(function(period) {
- // Set the drawing style.
- ctx.fillStyle = colors['default'];
- ctx.strokeStyle = colors['default'];
- if (colors[event.name]) {
- ctx.fillStyle = colors[event.name];
- ctx.strokeStyle = colors[event.name];
- } else if (colors[event.category]) {
- ctx.fillStyle = colors[event.category];
- ctx.strokeStyle = colors[event.category];
- }
- // Draw the timeline
- var timelineHeadPosition = x + period.start * ratio;
- if (!isSectionEvent(event)) {
- ctx.fillRect(timelineHeadPosition, h + 3, 2, 6);
- ctx.fillRect(timelineHeadPosition, h, (period.end - period.start) * ratio || 2, 6);
- } else {
- var timelineTailPosition = x + period.end * ratio;
- ctx.beginPath();
- ctx.moveTo(timelineHeadPosition, h);
- ctx.lineTo(timelineHeadPosition, h + 11);
- ctx.lineTo(timelineHeadPosition + 8, h);
- ctx.lineTo(timelineHeadPosition, h);
- ctx.fill();
- ctx.closePath();
- ctx.stroke();
- ctx.beginPath();
- ctx.moveTo(timelineTailPosition, h);
- ctx.lineTo(timelineTailPosition, h + 11);
- ctx.lineTo(timelineTailPosition - 8, h);
- ctx.lineTo(timelineTailPosition, h);
- ctx.fill();
- ctx.closePath();
- ctx.stroke();
- ctx.beginPath();
- ctx.moveTo(timelineHeadPosition, h);
- ctx.lineTo(timelineTailPosition, h);
- ctx.lineTo(timelineTailPosition, h + 2);
- ctx.lineTo(timelineHeadPosition, h + 2);
- ctx.lineTo(timelineHeadPosition, h);
- ctx.fill();
- ctx.closePath();
- ctx.stroke();
- }
- });
- h += 30;
- ctx.beginPath();
- ctx.strokeStyle = \"#dfdfdf\";
- ctx.moveTo(0, h - 10);
- ctx.lineTo(width, h - 10);
- ctx.closePath();
- ctx.stroke();
- });
- h = space;
- // For each event, draw the label.
- mainEvents.forEach(function(event) {
- ctx.fillStyle = \"#444\";
- ctx.font = \"12px sans-serif\";
- text = event.name;
- ms = \" ~ \" + (event.duration < 1 ? event.duration : parseInt(event.duration, 10)) + \" ms / ~ \" + event.memory + \" MB\";
- if (x + event.starttime * ratio + ctx.measureText(text + ms).width > width) {
- ctx.textAlign = \"end\";
- ctx.font = \"10px sans-serif\";
- xc = x + event.endtime * ratio - 1;
- ctx.fillText(ms, xc, h);
- xc -= ctx.measureText(ms).width;
- ctx.font = \"12px sans-serif\";
- ctx.fillText(text, xc, h);
- } else {
- ctx.textAlign = \"start\";
- ctx.font = \"12px sans-serif\";
- xc = x + event.starttime * ratio + 1;
- ctx.fillText(text, xc, h);
- xc += ctx.measureText(text).width;
- ctx.font = \"10px sans-serif\";
- ctx.fillText(ms, xc, h);
- }
- h += gapPerEvent;
- });
- };
- this.drawAll = function(width, threshold)
- {
- \"use strict\";
- width = width || getContainerWidth();
- threshold = threshold || this.getThreshold();
- var self = this;
- _requests.forEach(function(request) {
- self.drawOne(request, maxRequestTime, threshold, width);
- });
- };
- this.getThreshold = function() {
- var threshold = Sfjs.getPreference(_storagePrefix + 'threshold');
- if (threshold === null) {
- return _threshold;
- }
- _threshold = parseInt(threshold);
- return _threshold;
- };
- this.setThreshold = function(threshold)
- {
- _threshold = threshold;
- Sfjs.setPreference(_storagePrefix + 'threshold', threshold);
- return this;
- };
- };
- function canvasAutoUpdateOnResizeAndSubmit(e) {
- e.preventDefault();
- canvasManager.drawAll();
- }
- function canvasAutoUpdateOnThresholdChange(e) {
- canvasManager
- .setThreshold(query('input[name=\"threshold\"]').value)
- .drawAll();
- }
- var requests_data = {
- \"max\": ";
- // line 404
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "collector"), "events"), "__section__"), "endtime")), "js", null, true);
- echo ",
- \"requests\": [
- ";
- // line 406
- echo $context["__internal_73f281c4dc109eb828f42c473ab7a4162ecb9416a00239915790be94adb81cae"]->getdump_request_data($this->getContext($context, "token"), $this->getContext($context, "profile"), $this->getAttribute($this->getContext($context, "collector"), "events"), $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "collector"), "events"), "__section__"), "origin"));
- echo "
- ";
- // line 408
- if (twig_length_filter($this->env, $this->getAttribute($this->getContext($context, "profile"), "children"))) {
- // line 409
- echo " ,
- ";
- // line 410
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "profile"), "children"));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
- // line 411
- echo $context["__internal_73f281c4dc109eb828f42c473ab7a4162ecb9416a00239915790be94adb81cae"]->getdump_request_data($this->getAttribute($this->getContext($context, "child"), "token"), $this->getContext($context, "child"), $this->getAttribute($this->getAttribute($this->getContext($context, "child"), "getcollector", array(0 => "time"), "method"), "events"), $this->getAttribute($this->getAttribute($this->getAttribute($this->getContext($context, "collector"), "events"), "__section__"), "origin"));
- echo (($this->getAttribute($this->getContext($context, "loop"), "last")) ? ("") : (","));
- echo "
- ";
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- }
- // line 414
- echo " ]
- };
- var canvasManager = new CanvasManager(requests_data.requests, requests_data.max);
- query('input[name=\"threshold\"]').value = canvasManager.getThreshold();
- canvasManager.drawAll();
- // Update the colors of legends.
- var timelineLegends = document.querySelectorAll('.sf-profiler-timeline > .legends > span[data-color]');
- for (var i = 0; i < timelineLegends.length; ++i) {
- var timelineLegend = timelineLegends[i];
- timelineLegend.style.borderLeftColor = timelineLegend.getAttribute('data-color');
- }
- // Bind event handlers
- var elementTimelineControl = query('#timeline-control'),
- elementThresholdControl = query('input[name=\"threshold\"]');
- window.onresize = canvasAutoUpdateOnResizeAndSubmit;
- elementTimelineControl.onsubmit = canvasAutoUpdateOnResizeAndSubmit;
- elementThresholdControl.onclick = canvasAutoUpdateOnThresholdChange;
- elementThresholdControl.onchange = canvasAutoUpdateOnThresholdChange;
- elementThresholdControl.onkeyup = canvasAutoUpdateOnThresholdChange;
- window.setTimeout(function() {
- canvasAutoUpdateOnThresholdChange(null);
- }, 50);
- //]]>";
- // line 446
- echo "</script>
- ";
- }
- // line 449
- public function getdump_request_data($_token = null, $_profile = null, $_events = null, $_origin = null)
- {
- $context = $this->env->mergeGlobals(array(
- "token" => $_token,
- "profile" => $_profile,
- "events" => $_events,
- "origin" => $_origin,
- ));
- $blocks = array();
- ob_start();
- try {
- // line 451
- $context["__internal_e7dd6c3faebf33229115964b0baaa117ccea9d7a6d2df649ea88802f16a640b0"] = $this;
- // line 452
- echo " {
- \"id\": \"";
- // line 453
- echo twig_escape_filter($this->env, $this->getContext($context, "token"), "js", null, true);
- echo "\",
- \"left\": ";
- // line 454
- echo twig_escape_filter($this->env, sprintf("%F", ($this->getAttribute($this->getAttribute($this->getContext($context, "events"), "__section__"), "origin") - $this->getContext($context, "origin"))), "js", null, true);
- echo ",
- \"events\": [
- ";
- // line 456
- echo $context["__internal_e7dd6c3faebf33229115964b0baaa117ccea9d7a6d2df649ea88802f16a640b0"]->getdump_events($this->getContext($context, "events"));
- echo "
- ]
- }
- ";
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- // line 462
- public function getdump_events($_events = null)
- {
- $context = $this->env->mergeGlobals(array(
- "events" => $_events,
- ));
- $blocks = array();
- ob_start();
- try {
- // line 464
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getContext($context, "events"));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["name"] => $context["event"]) {
- // line 465
- if (("__section__" != $this->getContext($context, "name"))) {
- // line 466
- echo " {
- \"name\": \"";
- // line 467
- echo twig_escape_filter($this->env, $this->getContext($context, "name"), "js", null, true);
- echo "\",
- \"category\": \"";
- // line 468
- echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "event"), "category"), "js", null, true);
- echo "\",
- \"origin\": ";
- // line 469
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "event"), "origin")), "js", null, true);
- echo ",
- \"starttime\": ";
- // line 470
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "event"), "starttime")), "js", null, true);
- echo ",
- \"endtime\": ";
- // line 471
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "event"), "endtime")), "js", null, true);
- echo ",
- \"duration\": ";
- // line 472
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "event"), "duration")), "js", null, true);
- echo ",
- \"memory\": ";
- // line 473
- echo twig_escape_filter($this->env, sprintf("%.1F", (($this->getAttribute($this->getContext($context, "event"), "memory") / 1024) / 1024)), "js", null, true);
- echo ",
- \"periods\": [";
- // line 475
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, "event"), "periods"));
- $context['loop'] = array(
- 'parent' => $context['_parent'],
- 'index0' => 0,
- 'index' => 1,
- 'first' => true,
- );
- if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
- $length = count($context['_seq']);
- $context['loop']['revindex0'] = $length - 1;
- $context['loop']['revindex'] = $length;
- $context['loop']['length'] = $length;
- $context['loop']['last'] = 1 === $length;
- }
- foreach ($context['_seq'] as $context["_key"] => $context["period"]) {
- // line 476
- echo "{\"start\": ";
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "period"), "starttime")), "js", null, true);
- echo ", \"end\": ";
- echo twig_escape_filter($this->env, sprintf("%F", $this->getAttribute($this->getContext($context, "period"), "endtime")), "js", null, true);
- echo "}";
- echo (($this->getAttribute($this->getContext($context, "loop"), "last")) ? ("") : (", "));
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['period'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 478
- echo "]
- }";
- // line 479
- echo (($this->getAttribute($this->getContext($context, "loop"), "last")) ? ("") : (","));
- echo "
- ";
- }
- ++$context['loop']['index0'];
- ++$context['loop']['index'];
- $context['loop']['first'] = false;
- if (isset($context['loop']['length'])) {
- --$context['loop']['revindex0'];
- --$context['loop']['revindex'];
- $context['loop']['last'] = 0 === $context['loop']['revindex0'];
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['name'], $context['event'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- // line 485
- public function getdisplay_timeline($_id = null, $_events = null, $_colors = null)
- {
- $context = $this->env->mergeGlobals(array(
- "id" => $_id,
- "events" => $_events,
- "colors" => $_colors,
- ));
- $blocks = array();
- ob_start();
- try {
- // line 486
- echo " <div class=\"sf-profiler-timeline\">
- <div class=\"legends\">
- ";
- // line 488
- $context['_parent'] = (array) $context;
- $context['_seq'] = twig_ensure_traversable($this->getContext($context, "colors"));
- foreach ($context['_seq'] as $context["category"] => $context["color"]) {
- // line 489
- echo " <span data-color=\"";
- echo twig_escape_filter($this->env, $this->getContext($context, "color"), "html", null, true);
- echo "\">";
- echo twig_escape_filter($this->env, $this->getContext($context, "category"), "html", null, true);
- echo "</span>
- ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['category'], $context['color'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- // line 491
- echo " </div>
- <canvas width=\"680\" height=\"\" id=\"";
- // line 492
- echo twig_escape_filter($this->env, $this->getContext($context, "id"), "html", null, true);
- echo "\" class=\"timeline\"></canvas>
- </div>
- ";
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- public function getTemplateName()
- {
- return "WebProfilerBundle:Collector:time.html.twig";
- }
- public function isTraitable()
- {
- return false;
- }
- public function getDebugInfo()
- {
- return array ( 810 => 492, 807 => 491, 796 => 489, 792 => 488, 788 => 486, 775 => 485, 749 => 479, 746 => 478, 727 => 476, 706 => 473, 702 => 472, 698 => 471, 694 => 470, 690 => 469, 686 => 468, 682 => 467, 679 => 466, 677 => 465, 660 => 464, 634 => 456, 625 => 453, 620 => 451, 606 => 449, 601 => 446, 567 => 414, 532 => 410, 527 => 408, 522 => 406, 202 => 94, 403 => 136, 401 => 135, 391 => 133, 382 => 131, 356 => 122, 347 => 119, 234 => 90, 389 => 160, 380 => 158, 363 => 153, 361 => 152, 358 => 151, 345 => 147, 340 => 145, 331 => 140, 326 => 138, 307 => 128, 288 => 118, 281 => 98, 259 => 103, 255 => 101, 253 => 100, 248 => 97, 213 => 78, 197 => 69, 175 => 58, 191 => 67, 185 => 75, 113 => 48, 104 => 31, 367 => 155, 353 => 121, 306 => 286, 232 => 89, 161 => 58, 184 => 63, 170 => 84, 150 => 71, 84 => 40, 65 => 11, 292 => 156, 287 => 153, 265 => 105, 257 => 141, 251 => 138, 233 => 131, 186 => 72, 167 => 71, 153 => 77, 148 => 67, 126 => 83, 195 => 89, 146 => 64, 58 => 25, 757 => 345, 751 => 341, 742 => 339, 738 => 338, 734 => 337, 728 => 334, 724 => 333, 710 => 475, 703 => 321, 696 => 317, 674 => 304, 667 => 300, 659 => 295, 645 => 290, 639 => 287, 635 => 286, 630 => 284, 566 => 222, 559 => 220, 553 => 217, 548 => 215, 543 => 214, 537 => 212, 531 => 210, 529 => 409, 525 => 208, 517 => 404, 512 => 204, 506 => 200, 501 => 198, 496 => 197, 490 => 195, 484 => 193, 482 => 192, 470 => 190, 459 => 183, 443 => 178, 412 => 166, 396 => 161, 390 => 159, 388 => 158, 329 => 139, 324 => 112, 274 => 96, 260 => 142, 256 => 103, 244 => 128, 222 => 83, 216 => 79, 206 => 87, 200 => 117, 127 => 35, 100 => 46, 350 => 120, 342 => 189, 284 => 112, 271 => 136, 267 => 135, 228 => 128, 215 => 104, 211 => 88, 178 => 59, 165 => 83, 20 => 1, 809 => 338, 802 => 334, 794 => 331, 786 => 328, 778 => 325, 770 => 322, 762 => 347, 754 => 316, 745 => 310, 740 => 308, 723 => 293, 717 => 329, 711 => 291, 708 => 290, 695 => 284, 689 => 313, 681 => 308, 673 => 279, 664 => 277, 661 => 276, 658 => 275, 655 => 294, 651 => 272, 649 => 462, 646 => 270, 642 => 268, 640 => 267, 636 => 266, 631 => 265, 629 => 454, 626 => 263, 622 => 452, 619 => 260, 603 => 254, 597 => 251, 589 => 250, 581 => 249, 572 => 247, 569 => 246, 564 => 245, 560 => 243, 557 => 242, 554 => 241, 551 => 240, 549 => 411, 546 => 238, 530 => 232, 524 => 229, 516 => 228, 499 => 225, 491 => 223, 488 => 222, 477 => 214, 473 => 213, 463 => 212, 454 => 181, 451 => 209, 447 => 207, 441 => 205, 438 => 204, 434 => 202, 411 => 194, 405 => 191, 397 => 190, 383 => 185, 378 => 157, 371 => 127, 335 => 169, 318 => 164, 302 => 125, 293 => 107, 377 => 129, 354 => 192, 338 => 116, 330 => 183, 313 => 110, 308 => 109, 262 => 93, 242 => 116, 237 => 91, 231 => 96, 225 => 115, 223 => 114, 198 => 107, 194 => 68, 192 => 82, 155 => 55, 134 => 39, 129 => 63, 124 => 57, 110 => 22, 508 => 227, 505 => 250, 493 => 241, 487 => 238, 478 => 191, 468 => 223, 465 => 187, 456 => 218, 446 => 216, 436 => 214, 426 => 212, 416 => 210, 406 => 208, 404 => 207, 399 => 204, 392 => 202, 376 => 156, 370 => 198, 349 => 144, 344 => 180, 339 => 179, 333 => 115, 327 => 175, 325 => 166, 321 => 135, 317 => 134, 311 => 162, 303 => 165, 296 => 121, 275 => 154, 249 => 92, 212 => 254, 210 => 77, 205 => 138, 23 => 1, 70 => 15, 449 => 180, 431 => 174, 418 => 170, 414 => 142, 394 => 134, 386 => 159, 372 => 115, 364 => 113, 359 => 123, 351 => 109, 346 => 190, 343 => 146, 334 => 141, 328 => 113, 323 => 80, 315 => 111, 304 => 67, 297 => 158, 290 => 119, 286 => 58, 282 => 57, 279 => 110, 276 => 111, 250 => 102, 207 => 76, 190 => 92, 188 => 90, 174 => 74, 152 => 54, 137 => 65, 118 => 49, 114 => 36, 97 => 41, 90 => 42, 81 => 41, 76 => 34, 180 => 70, 172 => 68, 77 => 34, 53 => 15, 34 => 6, 480 => 162, 474 => 161, 469 => 158, 461 => 155, 457 => 153, 453 => 151, 444 => 206, 440 => 148, 437 => 176, 435 => 175, 430 => 201, 427 => 200, 423 => 173, 413 => 141, 409 => 132, 407 => 138, 402 => 163, 398 => 129, 393 => 126, 387 => 187, 384 => 157, 381 => 120, 379 => 119, 374 => 128, 368 => 126, 365 => 125, 362 => 124, 360 => 147, 355 => 150, 341 => 117, 337 => 140, 322 => 165, 314 => 99, 312 => 130, 309 => 129, 305 => 108, 298 => 164, 294 => 90, 285 => 100, 283 => 115, 278 => 86, 268 => 107, 264 => 84, 258 => 126, 252 => 140, 247 => 121, 241 => 93, 229 => 87, 220 => 70, 214 => 123, 177 => 69, 169 => 75, 140 => 53, 132 => 51, 128 => 42, 107 => 56, 61 => 15, 273 => 96, 269 => 107, 254 => 198, 243 => 88, 240 => 14, 238 => 125, 235 => 89, 230 => 11, 227 => 86, 224 => 127, 221 => 80, 219 => 125, 217 => 75, 208 => 76, 204 => 75, 179 => 69, 159 => 57, 143 => 69, 135 => 46, 119 => 58, 102 => 24, 71 => 23, 67 => 14, 63 => 21, 59 => 22, 93 => 38, 88 => 24, 78 => 19, 94 => 21, 89 => 30, 85 => 23, 75 => 18, 68 => 30, 56 => 11, 27 => 3, 201 => 74, 196 => 92, 183 => 71, 171 => 73, 166 => 54, 163 => 82, 158 => 80, 156 => 71, 151 => 63, 142 => 64, 138 => 47, 136 => 71, 121 => 50, 117 => 37, 105 => 25, 91 => 25, 62 => 27, 49 => 11, 87 => 41, 46 => 10, 44 => 20, 25 => 35, 21 => 2, 31 => 4, 38 => 18, 26 => 3, 28 => 3, 24 => 3, 19 => 1, 79 => 18, 72 => 17, 69 => 26, 47 => 21, 40 => 8, 37 => 7, 22 => 2, 246 => 136, 157 => 56, 145 => 74, 139 => 63, 131 => 61, 123 => 61, 120 => 38, 115 => 58, 111 => 47, 108 => 33, 101 => 30, 98 => 45, 96 => 37, 83 => 33, 74 => 27, 66 => 25, 55 => 24, 52 => 12, 50 => 22, 43 => 12, 41 => 19, 35 => 6, 32 => 6, 29 => 3, 209 => 161, 203 => 73, 199 => 93, 193 => 95, 189 => 66, 187 => 92, 182 => 87, 176 => 86, 173 => 85, 168 => 48, 164 => 70, 162 => 74, 154 => 61, 149 => 68, 147 => 75, 144 => 42, 141 => 73, 133 => 45, 130 => 36, 125 => 41, 122 => 43, 116 => 57, 112 => 58, 109 => 52, 106 => 51, 103 => 50, 99 => 23, 95 => 27, 92 => 43, 86 => 51, 82 => 21, 80 => 32, 73 => 33, 64 => 23, 60 => 12, 57 => 20, 54 => 19, 51 => 37, 48 => 16, 45 => 8, 42 => 7, 39 => 6, 36 => 5, 33 => 4, 30 => 5,);
- }
- }