var/cache/dev/twig/0e/0eea13280d4cd7c12919370341c743d9.php line 54

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @WebProfiler/Collector/time.html.twig */
  14. class __TwigTemplate_c171f204fc0547a36b2c674ebfcf1b22 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'toolbar' => [$this'block_toolbar'],
  24.             'menu' => [$this'block_menu'],
  25.             'panel' => [$this'block_panel'],
  26.             'panelContent' => [$this'block_panelContent'],
  27.         ];
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "@WebProfiler/Profiler/layout.html.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WebProfiler/Collector/time.html.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WebProfiler/Collector/time.html.twig"));
  41.         // line 3
  42.         $macros["helper"] = $this->macros["helper"] = $this;
  43.         // line 1
  44.         $this->parent $this->loadTemplate("@WebProfiler/Profiler/layout.html.twig""@WebProfiler/Collector/time.html.twig"1);
  45.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  46.         
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48.         
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  50.     }
  51.     // line 5
  52.     public function block_toolbar($context, array $blocks = [])
  53.     {
  54.         $macros $this->macros;
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""toolbar"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""toolbar"));
  59.         // line 6
  60.         echo "    ";
  61.         $context["has_time_events"] = (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'6$this->source); })()), "events", [], "any"falsefalsefalse6)) > 0);
  62.         // line 7
  63.         echo "    ";
  64.         $context["total_time"] = (((isset($context["has_time_events"]) || array_key_exists("has_time_events"$context) ? $context["has_time_events"] : (function () { throw new RuntimeError('Variable "has_time_events" does not exist.'7$this->source); })())) ? (twig_sprintf("%.0f"twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'7$this->source); })()), "duration", [], "any"falsefalsefalse7))) : ("n/a"));
  65.         // line 8
  66.         echo "    ";
  67.         $context["initialization_time"] = ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'8$this->source); })()), "events", [], "any"falsefalsefalse8))) ? (twig_sprintf("%.0f"twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'8$this->source); })()), "inittime", [], "any"falsefalsefalse8))) : ("n/a"));
  68.         // line 9
  69.         echo "    ";
  70.         $context["status_color"] = ((((isset($context["has_time_events"]) || array_key_exists("has_time_events"$context) ? $context["has_time_events"] : (function () { throw new RuntimeError('Variable "has_time_events" does not exist.'9$this->source); })()) && (twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'9$this->source); })()), "duration", [], "any"falsefalsefalse9) > 1000))) ? ("yellow") : (""));
  71.         // line 10
  72.         echo "
  73.     ";
  74.         // line 11
  75.         ob_start();
  76.         // line 12
  77.         echo "        ";
  78.         echo twig_source($this->env"@WebProfiler/Icon/time.svg");
  79.         echo "
  80.         <span class=\"sf-toolbar-value\">";
  81.         // line 13
  82.         echo twig_escape_filter($this->env, (isset($context["total_time"]) || array_key_exists("total_time"$context) ? $context["total_time"] : (function () { throw new RuntimeError('Variable "total_time" does not exist.'13$this->source); })()), "html"nulltrue);
  83.         echo "</span>
  84.         <span class=\"sf-toolbar-label\">ms</span>
  85.     ";
  86.         $context["icon"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  87.         // line 16
  88.         echo "
  89.     ";
  90.         // line 17
  91.         ob_start();
  92.         // line 18
  93.         echo "        <div class=\"sf-toolbar-info-piece\">
  94.             <b>Total time</b>
  95.             <span>";
  96.         // line 20
  97.         echo twig_escape_filter($this->env, (isset($context["total_time"]) || array_key_exists("total_time"$context) ? $context["total_time"] : (function () { throw new RuntimeError('Variable "total_time" does not exist.'20$this->source); })()), "html"nulltrue);
  98.         echo " ms</span>
  99.         </div>
  100.         <div class=\"sf-toolbar-info-piece\">
  101.             <b>Initialization time</b>
  102.             <span>";
  103.         // line 24
  104.         echo twig_escape_filter($this->env, (isset($context["initialization_time"]) || array_key_exists("initialization_time"$context) ? $context["initialization_time"] : (function () { throw new RuntimeError('Variable "initialization_time" does not exist.'24$this->source); })()), "html"nulltrue);
  105.         echo " ms</span>
  106.         </div>
  107.     ";
  108.         $context["text"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  109.         // line 27
  110.         echo "
  111.     ";
  112.         // line 28
  113.         echo twig_include($this->env$context"@WebProfiler/Profiler/toolbar_item.html.twig", ["link" => (isset($context["profiler_url"]) || array_key_exists("profiler_url"$context) ? $context["profiler_url"] : (function () { throw new RuntimeError('Variable "profiler_url" does not exist.'28$this->source); })()), "status" => (isset($context["status_color"]) || array_key_exists("status_color"$context) ? $context["status_color"] : (function () { throw new RuntimeError('Variable "status_color" does not exist.'28$this->source); })())]);
  114.         echo "
  115. ";
  116.         
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  118.         
  119.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  120.     }
  121.     // line 31
  122.     public function block_menu($context, array $blocks = [])
  123.     {
  124.         $macros $this->macros;
  125.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  126.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""menu"));
  127.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  128.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""menu"));
  129.         // line 32
  130.         echo "    <span class=\"label\">
  131.         <span class=\"icon\">";
  132.         // line 33
  133.         echo twig_source($this->env"@WebProfiler/Icon/time.svg");
  134.         echo "</span>
  135.         <strong>Performance</strong>
  136.     </span>
  137. ";
  138.         
  139.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  140.         
  141.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  142.     }
  143.     // line 38
  144.     public function block_panel($context, array $blocks = [])
  145.     {
  146.         $macros $this->macros;
  147.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  148.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panel"));
  149.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  150.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panel"));
  151.         // line 39
  152.         echo "    ";
  153.         $context["has_time_events"] = (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'39$this->source); })()), "events", [], "any"falsefalsefalse39)) > 0);
  154.         // line 40
  155.         echo "    <h2>Performance metrics</h2>
  156.     <div class=\"metrics\">
  157.         <div class=\"metric-group\">
  158.             <div class=\"metric\">
  159.                 <span class=\"value\">";
  160.         // line 45
  161.         echo twig_escape_filter($this->envtwig_sprintf("%.0f"twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'45$this->source); })()), "duration", [], "any"falsefalsefalse45)), "html"nulltrue);
  162.         echo " <span class=\"unit\">ms</span></span>
  163.                 <span class=\"label\">Total execution time</span>
  164.             </div>
  165.             <div class=\"metric\">
  166.                 <span class=\"value\">";
  167.         // line 50
  168.         echo twig_escape_filter($this->envtwig_sprintf("%.0f"twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'50$this->source); })()), "inittime", [], "any"falsefalsefalse50)), "html"nulltrue);
  169.         echo " <span class=\"unit\">ms</span></span>
  170.                 <span class=\"label\">Symfony initialization</span>
  171.             </div>
  172.         </div>
  173.         ";
  174.         // line 55
  175.         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'55$this->source); })()), "collectors", [], "any"falsefalsefalse55), "memory", [], "any"falsefalsefalse55)) {
  176.             // line 56
  177.             echo "            <div class=\"metric-divider\"></div>
  178.             <div class=\"metric\">
  179.                 <span class=\"value\">";
  180.             // line 59
  181.             echo twig_escape_filter($this->envtwig_sprintf("%.2f", ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'59$this->source); })()), "collectors", [], "any"falsefalsefalse59), "memory", [], "any"falsefalsefalse59), "memory", [], "any"falsefalsefalse59) / 1024) / 1024)), "html"nulltrue);
  182.             echo " <span class=\"unit\">MiB</span></span>
  183.                 <span class=\"label\">Peak memory usage</span>
  184.             </div>
  185.         ";
  186.         }
  187.         // line 63
  188.         echo "
  189.         ";
  190.         // line 64
  191.         if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'64$this->source); })()), "children", [], "any"falsefalsefalse64)) > 0)) {
  192.             // line 65
  193.             echo "            <div class=\"metric-divider\"></div>
  194.             <div class=\"metric-group\">
  195.                 <div class=\"metric\">
  196.                     <span class=\"value\">";
  197.             // line 69
  198.             echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'69$this->source); })()), "children", [], "any"falsefalsefalse69)), "html"nulltrue);
  199.             echo "</span>
  200.                     <span class=\"label\">Sub-Request";
  201.             // line 70
  202.             echo (((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'70$this->source); })()), "children", [], "any"falsefalsefalse70)) > 1)) ? ("s") : (""));
  203.             echo "</span>
  204.                 </div>
  205.                 ";
  206.             // line 73
  207.             if ((isset($context["has_time_events"]) || array_key_exists("has_time_events"$context) ? $context["has_time_events"] : (function () { throw new RuntimeError('Variable "has_time_events" does not exist.'73$this->source); })())) {
  208.                 // line 74
  209.                 echo "                    ";
  210.                 $context["subrequests_time"] = 0;
  211.                 // line 75
  212.                 echo "                    ";
  213.                 $context['_parent'] = $context;
  214.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'75$this->source); })()), "children", [], "any"falsefalsefalse75));
  215.                 foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  216.                     // line 76
  217.                     echo "                        ";
  218.                     $context["subrequests_time"] = ((isset($context["subrequests_time"]) || array_key_exists("subrequests_time"$context) ? $context["subrequests_time"] : (function () { throw new RuntimeError('Variable "subrequests_time" does not exist.'76$this->source); })()) + twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "getcollector", [=> "time"], "method"falsefalsefalse76), "events", [], "any"falsefalsefalse76), "__section__", [], "any"falsefalsefalse76), "duration", [], "any"falsefalsefalse76));
  219.                     // line 77
  220.                     echo "                    ";
  221.                 }
  222.                 $_parent $context['_parent'];
  223.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  224.                 $context array_intersect_key($context$_parent) + $_parent;
  225.                 // line 78
  226.                 echo "                ";
  227.             } else {
  228.                 // line 79
  229.                 echo "                    ";
  230.                 $context["subrequests_time"] = "n/a";
  231.                 // line 80
  232.                 echo "                ";
  233.             }
  234.             // line 81
  235.             echo "
  236.                 <div class=\"metric\">
  237.                     <span class=\"value\">";
  238.             // line 83
  239.             echo twig_escape_filter($this->env, (isset($context["subrequests_time"]) || array_key_exists("subrequests_time"$context) ? $context["subrequests_time"] : (function () { throw new RuntimeError('Variable "subrequests_time" does not exist.'83$this->source); })()), "html"nulltrue);
  240.             echo " <span class=\"unit\">ms</span></span>
  241.                     <span class=\"label\">Sub-Request";
  242.             // line 84
  243.             echo (((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'84$this->source); })()), "children", [], "any"falsefalsefalse84)) > 1)) ? ("s") : (""));
  244.             echo " time</span>
  245.                 </div>
  246.             </div>
  247.         ";
  248.         }
  249.         // line 88
  250.         echo "    </div>
  251.     <h2>Execution timeline</h2>
  252.     ";
  253.         // line 92
  254.         if ( !twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'92$this->source); })()), "isStopwatchInstalled", [], "method"falsefalsefalse92)) {
  255.             // line 93
  256.             echo "        <div class=\"empty empty-panel\">
  257.             <p>The Stopwatch component is not installed. If you want to see timing events, run: <code>composer require symfony/stopwatch</code>.</p>
  258.         </div>
  259.     ";
  260.         } elseif (twig_test_empty(twig_get_attribute($this->env$this->source,         // line 96
  261. (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'96$this->source); })()), "events", [], "any"falsefalsefalse96))) {
  262.             // line 97
  263.             echo "        <div class=\"empty\">
  264.             <p>No timing events have been recorded. Check that symfony/stopwatch is installed and debugging enabled in the kernel.</p>
  265.         </div>
  266.     ";
  267.         } else {
  268.             // line 101
  269.             echo "        ";
  270.             $this->displayBlock("panelContent"$context$blocks);
  271.             echo "
  272.     ";
  273.         }
  274.         
  275.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  276.         
  277.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  278.     }
  279.     // line 105
  280.     public function block_panelContent($context, array $blocks = [])
  281.     {
  282.         $macros $this->macros;
  283.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  284.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panelContent"));
  285.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  286.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panelContent"));
  287.         // line 106
  288.         echo "    <form id=\"timeline-control\" action=\"\" method=\"get\">
  289.         <input type=\"hidden\" name=\"panel\" value=\"time\">
  290.         <label for=\"threshold\">Threshold</label>
  291.         <input type=\"number\" name=\"threshold\" id=\"threshold\" value=\"1\" min=\"0\" placeholder=\"1.1\"> ms
  292.         <span class=\"help\">(timeline only displays events with a duration longer than this threshold)</span>
  293.     </form>
  294.     ";
  295.         // line 113
  296.         if (twig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'113$this->source); })()), "parent", [], "any"falsefalsefalse113)) {
  297.             // line 114
  298.             echo "        <h3 class=\"dump-inline\">
  299.             Sub-Request ";
  300.             // line 115
  301.             echo $this->extensions['Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension']->dumpData($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'115$this->source); })()), "getcollector", [=> "request"], "method"falsefalsefalse115), "requestattributes", [], "any"falsefalsefalse115), "get", [=> "_controller"], "method"falsefalsefalse115));
  302.             echo "
  303.             <small>
  304.                 ";
  305.             // line 117
  306.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'117$this->source); })()), "events", [], "any"falsefalsefalse117), "__section__", [], "any"falsefalsefalse117), "duration", [], "any"falsefalsefalse117), "html"nulltrue);
  307.             echo " ms
  308.                 <a class=\"newline\" href=\"";
  309.             // line 118
  310.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_profiler", ["token" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'118$this->source); })()), "parent", [], "any"falsefalsefalse118), "token", [], "any"falsefalsefalse118), "panel" => "time"]), "html"nulltrue);
  311.             echo "\">Return to parent request</a>
  312.             </small>
  313.         </h3>
  314.     ";
  315.         } elseif ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source,         // line 121
  316. (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'121$this->source); })()), "children", [], "any"falsefalsefalse121)) > 0)) {
  317.             // line 122
  318.             echo "        <h3>
  319.             Main Request <small>";
  320.             // line 123
  321.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'123$this->source); })()), "events", [], "any"falsefalsefalse123), "__section__", [], "any"falsefalsefalse123), "duration", [], "any"falsefalsefalse123), "html"nulltrue);
  322.             echo " ms</small>
  323.         </h3>
  324.     ";
  325.         }
  326.         // line 126
  327.         echo "
  328.     ";
  329.         // line 127
  330.         echo twig_call_macro($macros["helper"], "macro_display_timeline", [(isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'127$this->source); })()), twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'127$this->source); })()), "events", [], "any"falsefalsefalse127), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'127$this->source); })()), "events", [], "any"falsefalsefalse127), "__section__", [], "any"falsefalsefalse127), "origin", [], "any"falsefalsefalse127)], 127$context$this->getSourceContext());
  331.         echo "
  332.     ";
  333.         // line 129
  334.         if (twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'129$this->source); })()), "children", [], "any"falsefalsefalse129))) {
  335.             // line 130
  336.             echo "        <p class=\"help\">Note: sections with a striped background correspond to sub-requests.</p>
  337.         <h3>Sub-requests <small>(";
  338.             // line 132
  339.             echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'132$this->source); })()), "children", [], "any"falsefalsefalse132)), "html"nulltrue);
  340.             echo ")</small></h3>
  341.         ";
  342.             // line 134
  343.             $context['_parent'] = $context;
  344.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["profile"]) || array_key_exists("profile"$context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.'134$this->source); })()), "children", [], "any"falsefalsefalse134));
  345.             foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
  346.                 // line 135
  347.                 echo "            ";
  348.                 $context["events"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "getcollector", [=> "time"], "method"falsefalsefalse135), "events", [], "any"falsefalsefalse135);
  349.                 // line 136
  350.                 echo "            <h4>
  351.                 <a href=\"";
  352.                 // line 137
  353.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("_profiler", ["token" => twig_get_attribute($this->env$this->source$context["child"], "token", [], "any"falsefalsefalse137), "panel" => "time"]), "html"nulltrue);
  354.                 echo "\">";
  355.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["child"], "getcollector", [=> "request"], "method"falsefalsefalse137), "identifier", [], "any"falsefalsefalse137), "html"nulltrue);
  356.                 echo "</a>
  357.                 <small>";
  358.                 // line 138
  359.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'138$this->source); })()), "__section__", [], "any"falsefalsefalse138), "duration", [], "any"falsefalsefalse138), "html"nulltrue);
  360.                 echo " ms</small>
  361.             </h4>
  362.             ";
  363.                 // line 141
  364.                 echo twig_call_macro($macros["helper"], "macro_display_timeline", [twig_get_attribute($this->env$this->source$context["child"], "token", [], "any"falsefalsefalse141), (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'141$this->source); })()), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'141$this->source); })()), "events", [], "any"falsefalsefalse141), "__section__", [], "any"falsefalsefalse141), "origin", [], "any"falsefalsefalse141)], 141$context$this->getSourceContext());
  365.                 echo "
  366.         ";
  367.             }
  368.             $_parent $context['_parent'];
  369.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
  370.             $context array_intersect_key($context$_parent) + $_parent;
  371.             // line 143
  372.             echo "    ";
  373.         }
  374.         // line 144
  375.         echo "
  376. <svg id=\"timeline-template\" width=\"0\" height=\"0\">
  377.   <defs>
  378.     <pattern id=\"subrequest\" class=\"timeline-subrequest-pattern\" patternUnits=\"userSpaceOnUse\" width=\"20\" height=\"20\" viewBox=\"0 0 40 40\">
  379.         <path d=\"M0 40L40 0H20L0 20M40 40V20L20 40\"/>
  380.     </pattern>
  381.   </defs>
  382. </svg>
  383. <style type=\"text/css\">
  384. ";
  385.         // line 153
  386.         echo twig_include($this->env$context"@WebProfiler/Collector/time.css.twig");
  387.         echo "
  388. </style>
  389. <script>
  390. ";
  391.         // line 156
  392.         echo twig_source($this->env"@WebProfiler/Collector/time.js");
  393.         echo "
  394. </script>
  395. ";
  396.         
  397.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  398.         
  399.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  400.     }
  401.     // line 160
  402.     public function macro_dump_request_data($__token__ null$__events__ null$__origin__ null, ...$__varargs__)
  403.     {
  404.         $macros $this->macros;
  405.         $context $this->env->mergeGlobals([
  406.             "token" => $__token__,
  407.             "events" => $__events__,
  408.             "origin" => $__origin__,
  409.             "varargs" => $__varargs__,
  410.         ]);
  411.         $blocks = [];
  412.         ob_start();
  413.         try {
  414.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  415.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""dump_request_data"));
  416.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  417.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""dump_request_data"));
  418.             // line 162
  419.             $macros["__internal_parse_0"] = $this;
  420.             // line 163
  421.             echo "{
  422.     id: \"";
  423.             // line 164
  424.             echo twig_escape_filter($this->env, (isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'164$this->source); })()), "js"nulltrue);
  425.             echo "\",
  426.     left: ";
  427.             // line 165
  428.             echo twig_escape_filter($this->envtwig_sprintf("%F", (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'165$this->source); })()), "__section__", [], "any"falsefalsefalse165), "origin", [], "any"falsefalsefalse165) - (isset($context["origin"]) || array_key_exists("origin"$context) ? $context["origin"] : (function () { throw new RuntimeError('Variable "origin" does not exist.'165$this->source); })()))), "js"nulltrue);
  429.             echo ",
  430.     end: \"";
  431.             // line 166
  432.             echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'166$this->source); })()), "__section__", [], "any"falsefalsefalse166), "endtime", [], "any"falsefalsefalse166)), "js"nulltrue);
  433.             echo "\",
  434.     events: [ ";
  435.             // line 167
  436.             echo twig_call_macro($macros["__internal_parse_0"], "macro_dump_events", [(isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'167$this->source); })())], 167$context$this->getSourceContext());
  437.             echo " ],
  438. }
  439. ";
  440.             
  441.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  442.             
  443.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  444.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  445.         } finally {
  446.             ob_end_clean();
  447.         }
  448.     }
  449.     // line 172
  450.     public function macro_dump_events($__events__ null, ...$__varargs__)
  451.     {
  452.         $macros $this->macros;
  453.         $context $this->env->mergeGlobals([
  454.             "events" => $__events__,
  455.             "varargs" => $__varargs__,
  456.         ]);
  457.         $blocks = [];
  458.         ob_start();
  459.         try {
  460.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  461.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""dump_events"));
  462.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  463.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""dump_events"));
  464.             // line 174
  465.             $context['_parent'] = $context;
  466.             $context['_seq'] = twig_ensure_traversable((isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'174$this->source); })()));
  467.             foreach ($context['_seq'] as $context["name"] => $context["event"]) {
  468.                 // line 175
  469.                 if (("__section__" != $context["name"])) {
  470.                     // line 176
  471.                     echo "{
  472.     name: \"";
  473.                     // line 177
  474.                     echo twig_escape_filter($this->env$context["name"], "js"nulltrue);
  475.                     echo "\",
  476.     category: \"";
  477.                     // line 178
  478.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["event"], "category", [], "any"falsefalsefalse178), "js"nulltrue);
  479.                     echo "\",
  480.     origin: ";
  481.                     // line 179
  482.                     echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["event"], "origin", [], "any"falsefalsefalse179)), "js"nulltrue);
  483.                     echo ",
  484.     starttime: ";
  485.                     // line 180
  486.                     echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["event"], "starttime", [], "any"falsefalsefalse180)), "js"nulltrue);
  487.                     echo ",
  488.     endtime: ";
  489.                     // line 181
  490.                     echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["event"], "endtime", [], "any"falsefalsefalse181)), "js"nulltrue);
  491.                     echo ",
  492.     duration: ";
  493.                     // line 182
  494.                     echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["event"], "duration", [], "any"falsefalsefalse182)), "js"nulltrue);
  495.                     echo ",
  496.     memory: ";
  497.                     // line 183
  498.                     echo twig_escape_filter($this->envtwig_sprintf("%.1F", ((twig_get_attribute($this->env$this->source$context["event"], "memory", [], "any"falsefalsefalse183) / 1024) / 1024)), "js"nulltrue);
  499.                     echo ",
  500.     elements: {},
  501.     periods: [";
  502.                     // line 186
  503.                     $context['_parent'] = $context;
  504.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["event"], "periods", [], "any"falsefalsefalse186));
  505.                     foreach ($context['_seq'] as $context["_key"] => $context["period"]) {
  506.                         // line 187
  507.                         echo "{
  508.             start: ";
  509.                         // line 188
  510.                         echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["period"], "starttime", [], "any"falsefalsefalse188)), "js"nulltrue);
  511.                         echo ",
  512.             end: ";
  513.                         // line 189
  514.                         echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["period"], "endtime", [], "any"falsefalsefalse189)), "js"nulltrue);
  515.                         echo ",
  516.             duration: ";
  517.                         // line 190
  518.                         echo twig_escape_filter($this->envtwig_sprintf("%F"twig_get_attribute($this->env$this->source$context["period"], "duration", [], "any"falsefalsefalse190)), "js"nulltrue);
  519.                         echo ",
  520.             elements: {}
  521.         },";
  522.                     }
  523.                     $_parent $context['_parent'];
  524.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['period'], $context['_parent'], $context['loop']);
  525.                     $context array_intersect_key($context$_parent) + $_parent;
  526.                     // line 194
  527.                     echo "],
  528. },
  529. ";
  530.                 }
  531.             }
  532.             $_parent $context['_parent'];
  533.             unset($context['_seq'], $context['_iterated'], $context['name'], $context['event'], $context['_parent'], $context['loop']);
  534.             $context array_intersect_key($context$_parent) + $_parent;
  535.             
  536.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  537.             
  538.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  539.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  540.         } finally {
  541.             ob_end_clean();
  542.         }
  543.     }
  544.     // line 201
  545.     public function macro_display_timeline($__token__ null$__events__ null$__origin__ null, ...$__varargs__)
  546.     {
  547.         $macros $this->macros;
  548.         $context $this->env->mergeGlobals([
  549.             "token" => $__token__,
  550.             "events" => $__events__,
  551.             "origin" => $__origin__,
  552.             "varargs" => $__varargs__,
  553.         ]);
  554.         $blocks = [];
  555.         ob_start();
  556.         try {
  557.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  558.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""display_timeline"));
  559.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  560.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""display_timeline"));
  561.             // line 202
  562.             $macros["helper"] = $this;
  563.             // line 203
  564.             echo "    <div class=\"sf-profiler-timeline\">
  565.         <div id=\"legend-";
  566.             // line 204
  567.             echo twig_escape_filter($this->env, (isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'204$this->source); })()), "html"nulltrue);
  568.             echo "\" class=\"legends\"></div>
  569.         <svg id=\"timeline-";
  570.             // line 205
  571.             echo twig_escape_filter($this->env, (isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'205$this->source); })()), "html"nulltrue);
  572.             echo "\" class=\"timeline-graph\"></svg>
  573.         <script>";
  574.             // line 207
  575.             echo "            window.addEventListener('load', function onLoad() {
  576.                 const theme = new Theme();
  577.                 new TimelineEngine(
  578.                     theme,
  579.                     new SvgRenderer(document.getElementById('timeline-";
  580.             // line 212
  581.             echo twig_escape_filter($this->env, (isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'212$this->source); })()), "js"nulltrue);
  582.             echo "')),
  583.                     new Legend(document.getElementById('legend-";
  584.             // line 213
  585.             echo twig_escape_filter($this->env, (isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'213$this->source); })()), "js"nulltrue);
  586.             echo "'), theme),
  587.                     document.getElementById('threshold'),
  588.                     ";
  589.             // line 215
  590.             echo twig_call_macro($macros["helper"], "macro_dump_request_data", [(isset($context["token"]) || array_key_exists("token"$context) ? $context["token"] : (function () { throw new RuntimeError('Variable "token" does not exist.'215$this->source); })()), (isset($context["events"]) || array_key_exists("events"$context) ? $context["events"] : (function () { throw new RuntimeError('Variable "events" does not exist.'215$this->source); })()), (isset($context["origin"]) || array_key_exists("origin"$context) ? $context["origin"] : (function () { throw new RuntimeError('Variable "origin" does not exist.'215$this->source); })())], 215$context$this->getSourceContext());
  591.             echo "
  592.                 );
  593.             });
  594.         ";
  595.             // line 218
  596.             echo "</script>
  597.     </div>
  598. ";
  599.             
  600.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  601.             
  602.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  603.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  604.         } finally {
  605.             ob_end_clean();
  606.         }
  607.     }
  608.     public function getTemplateName()
  609.     {
  610.         return "@WebProfiler/Collector/time.html.twig";
  611.     }
  612.     public function isTraitable()
  613.     {
  614.         return false;
  615.     }
  616.     public function getDebugInfo()
  617.     {
  618.         return array (  662 => 218,  656 => 215,  651 => 213,  647 => 212,  640 => 207,  636 => 205,  632 => 204,  629 => 203,  627 => 202,  606 => 201,  584 => 194,  575 => 190,  571 => 189,  567 => 188,  564 => 187,  560 => 186,  555 => 183,  551 => 182,  547 => 181,  543 => 180,  539 => 179,  535 => 178,  531 => 177,  528 => 176,  526 => 175,  522 => 174,  503 => 172,  485 => 167,  481 => 166,  477 => 165,  473 => 164,  470 => 163,  468 => 162,  447 => 160,  434 => 156,  428 => 153,  417 => 144,  414 => 143,  406 => 141,  400 => 138,  394 => 137,  391 => 136,  388 => 135,  384 => 134,  379 => 132,  375 => 130,  373 => 129,  368 => 127,  365 => 126,  359 => 123,  356 => 122,  354 => 121,  348 => 118,  344 => 117,  339 => 115,  336 => 114,  334 => 113,  325 => 106,  315 => 105,  301 => 101,  295 => 97,  293 => 96,  288 => 93,  286 => 92,  280 => 88,  273 => 84,  269 => 83,  265 => 81,  262 => 80,  259 => 79,  256 => 78,  250 => 77,  247 => 76,  242 => 75,  239 => 74,  237 => 73,  231 => 70,  227 => 69,  221 => 65,  219 => 64,  216 => 63,  209 => 59,  204 => 56,  202 => 55,  194 => 50,  186 => 45,  179 => 40,  176 => 39,  166 => 38,  152 => 33,  149 => 32,  139 => 31,  127 => 28,  124 => 27,  118 => 24,  111 => 20,  107 => 18,  105 => 17,  102 => 16,  96 => 13,  91 => 12,  89 => 11,  86 => 10,  83 => 9,  80 => 8,  77 => 7,  74 => 6,  64 => 5,  53 => 1,  51 => 3,  38 => 1,);
  619.     }
  620.     public function getSourceContext()
  621.     {
  622.         return new Source("{% extends '@WebProfiler/Profiler/layout.html.twig' %}
  623. {% import _self as helper %}
  624. {% block toolbar %}
  625.     {% set has_time_events = collector.events|length > 0 %}
  626.     {% set total_time = has_time_events ? '%.0f'|format(collector.duration) : 'n/a' %}
  627.     {% set initialization_time = collector.events|length ? '%.0f'|format(collector.inittime) : 'n/a' %}
  628.     {% set status_color = has_time_events and collector.duration > 1000 ? 'yellow' %}
  629.     {% set icon %}
  630.         {{ source('@WebProfiler/Icon/time.svg') }}
  631.         <span class=\"sf-toolbar-value\">{{ total_time }}</span>
  632.         <span class=\"sf-toolbar-label\">ms</span>
  633.     {% endset %}
  634.     {% set text %}
  635.         <div class=\"sf-toolbar-info-piece\">
  636.             <b>Total time</b>
  637.             <span>{{ total_time }} ms</span>
  638.         </div>
  639.         <div class=\"sf-toolbar-info-piece\">
  640.             <b>Initialization time</b>
  641.             <span>{{ initialization_time }} ms</span>
  642.         </div>
  643.     {% endset %}
  644.     {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
  645. {% endblock %}
  646. {% block menu %}
  647.     <span class=\"label\">
  648.         <span class=\"icon\">{{ source('@WebProfiler/Icon/time.svg') }}</span>
  649.         <strong>Performance</strong>
  650.     </span>
  651. {% endblock %}
  652. {% block panel %}
  653.     {% set has_time_events = collector.events|length > 0 %}
  654.     <h2>Performance metrics</h2>
  655.     <div class=\"metrics\">
  656.         <div class=\"metric-group\">
  657.             <div class=\"metric\">
  658.                 <span class=\"value\">{{ '%.0f'|format(collector.duration) }} <span class=\"unit\">ms</span></span>
  659.                 <span class=\"label\">Total execution time</span>
  660.             </div>
  661.             <div class=\"metric\">
  662.                 <span class=\"value\">{{ '%.0f'|format(collector.inittime) }} <span class=\"unit\">ms</span></span>
  663.                 <span class=\"label\">Symfony initialization</span>
  664.             </div>
  665.         </div>
  666.         {% if profile.collectors.memory %}
  667.             <div class=\"metric-divider\"></div>
  668.             <div class=\"metric\">
  669.                 <span class=\"value\">{{ '%.2f'|format(profile.collectors.memory.memory / 1024 / 1024) }} <span class=\"unit\">MiB</span></span>
  670.                 <span class=\"label\">Peak memory usage</span>
  671.             </div>
  672.         {% endif %}
  673.         {% if profile.children|length > 0 %}
  674.             <div class=\"metric-divider\"></div>
  675.             <div class=\"metric-group\">
  676.                 <div class=\"metric\">
  677.                     <span class=\"value\">{{ profile.children|length }}</span>
  678.                     <span class=\"label\">Sub-Request{{ profile.children|length > 1 ? 's' }}</span>
  679.                 </div>
  680.                 {% if has_time_events %}
  681.                     {% set subrequests_time = 0 %}
  682.                     {% for child in profile.children %}
  683.                         {% set subrequests_time = subrequests_time + child.getcollector('time').events.__section__.duration %}
  684.                     {% endfor %}
  685.                 {% else %}
  686.                     {% set subrequests_time = 'n/a' %}
  687.                 {% endif %}
  688.                 <div class=\"metric\">
  689.                     <span class=\"value\">{{ subrequests_time }} <span class=\"unit\">ms</span></span>
  690.                     <span class=\"label\">Sub-Request{{ profile.children|length > 1 ? 's' }} time</span>
  691.                 </div>
  692.             </div>
  693.         {% endif %}
  694.     </div>
  695.     <h2>Execution timeline</h2>
  696.     {% if not collector.isStopwatchInstalled() %}
  697.         <div class=\"empty empty-panel\">
  698.             <p>The Stopwatch component is not installed. If you want to see timing events, run: <code>composer require symfony/stopwatch</code>.</p>
  699.         </div>
  700.     {% elseif collector.events is empty %}
  701.         <div class=\"empty\">
  702.             <p>No timing events have been recorded. Check that symfony/stopwatch is installed and debugging enabled in the kernel.</p>
  703.         </div>
  704.     {% else %}
  705.         {{ block('panelContent') }}
  706.     {% endif %}
  707. {% endblock %}
  708. {% block panelContent %}
  709.     <form id=\"timeline-control\" action=\"\" method=\"get\">
  710.         <input type=\"hidden\" name=\"panel\" value=\"time\">
  711.         <label for=\"threshold\">Threshold</label>
  712.         <input type=\"number\" name=\"threshold\" id=\"threshold\" value=\"1\" min=\"0\" placeholder=\"1.1\"> ms
  713.         <span class=\"help\">(timeline only displays events with a duration longer than this threshold)</span>
  714.     </form>
  715.     {% if profile.parent %}
  716.         <h3 class=\"dump-inline\">
  717.             Sub-Request {{ profiler_dump(profile.getcollector('request').requestattributes.get('_controller')) }}
  718.             <small>
  719.                 {{ collector.events.__section__.duration }} ms
  720.                 <a class=\"newline\" href=\"{{ path('_profiler', { token: profile.parent.token, panel: 'time' }) }}\">Return to parent request</a>
  721.             </small>
  722.         </h3>
  723.     {% elseif profile.children|length > 0 %}
  724.         <h3>
  725.             Main Request <small>{{ collector.events.__section__.duration }} ms</small>
  726.         </h3>
  727.     {% endif %}
  728.     {{ helper.display_timeline(token, collector.events, collector.events.__section__.origin) }}
  729.     {% if profile.children|length %}
  730.         <p class=\"help\">Note: sections with a striped background correspond to sub-requests.</p>
  731.         <h3>Sub-requests <small>({{ profile.children|length }})</small></h3>
  732.         {% for child in profile.children %}
  733.             {% set events = child.getcollector('time').events %}
  734.             <h4>
  735.                 <a href=\"{{ path('_profiler', { token: child.token, panel: 'time' }) }}\">{{ child.getcollector('request').identifier }}</a>
  736.                 <small>{{ events.__section__.duration }} ms</small>
  737.             </h4>
  738.             {{ helper.display_timeline(child.token, events, collector.events.__section__.origin) }}
  739.         {% endfor %}
  740.     {% endif %}
  741. <svg id=\"timeline-template\" width=\"0\" height=\"0\">
  742.   <defs>
  743.     <pattern id=\"subrequest\" class=\"timeline-subrequest-pattern\" patternUnits=\"userSpaceOnUse\" width=\"20\" height=\"20\" viewBox=\"0 0 40 40\">
  744.         <path d=\"M0 40L40 0H20L0 20M40 40V20L20 40\"/>
  745.     </pattern>
  746.   </defs>
  747. </svg>
  748. <style type=\"text/css\">
  749. {{ include('@WebProfiler/Collector/time.css.twig') }}
  750. </style>
  751. <script>
  752. {{ source('@WebProfiler/Collector/time.js') }}
  753. </script>
  754. {% endblock %}
  755. {% macro dump_request_data(token, events, origin) %}
  756. {% autoescape 'js' %}
  757. {% from _self import dump_events %}
  758. {
  759.     id: \"{{ token }}\",
  760.     left: {{ \"%F\"|format(events.__section__.origin - origin) }},
  761.     end: \"{{ '%F'|format(events.__section__.endtime) }}\",
  762.     events: [ {{ dump_events(events) }} ],
  763. }
  764. {% endautoescape %}
  765. {% endmacro %}
  766. {% macro dump_events(events) %}
  767. {% autoescape 'js' %}
  768. {% for name, event in events %}
  769. {% if '__section__' != name %}
  770. {
  771.     name: \"{{ name }}\",
  772.     category: \"{{ event.category }}\",
  773.     origin: {{ \"%F\"|format(event.origin) }},
  774.     starttime: {{ \"%F\"|format(event.starttime) }},
  775.     endtime: {{ \"%F\"|format(event.endtime) }},
  776.     duration: {{ \"%F\"|format(event.duration) }},
  777.     memory: {{ \"%.1F\"|format(event.memory / 1024 / 1024) }},
  778.     elements: {},
  779.     periods: [
  780.         {%- for period in event.periods -%}
  781.         {
  782.             start: {{ \"%F\"|format(period.starttime) }},
  783.             end: {{ \"%F\"|format(period.endtime) }},
  784.             duration: {{ \"%F\"|format(period.duration) }},
  785.             elements: {}
  786.         },
  787.         {%- endfor -%}
  788.     ],
  789. },
  790. {% endif %}
  791. {% endfor %}
  792. {% endautoescape %}
  793. {% endmacro %}
  794. {% macro display_timeline(token, events, origin) %}
  795. {% import _self as helper %}
  796.     <div class=\"sf-profiler-timeline\">
  797.         <div id=\"legend-{{ token }}\" class=\"legends\"></div>
  798.         <svg id=\"timeline-{{ token }}\" class=\"timeline-graph\"></svg>
  799.         <script>{% autoescape 'js' %}
  800.             window.addEventListener('load', function onLoad() {
  801.                 const theme = new Theme();
  802.                 new TimelineEngine(
  803.                     theme,
  804.                     new SvgRenderer(document.getElementById('timeline-{{ token }}')),
  805.                     new Legend(document.getElementById('legend-{{ token }}'), theme),
  806.                     document.getElementById('threshold'),
  807.                     {{ helper.dump_request_data(token, events, origin) }}
  808.                 );
  809.             });
  810.         {% endautoescape %}</script>
  811.     </div>
  812. {% endmacro %}
  813. ""@WebProfiler/Collector/time.html.twig""/home/bestofi/bestof/vendor/symfony/web-profiler-bundle/Resources/views/Collector/time.html.twig");
  814.     }
  815. }