var_dev/cache/dev/twig/8d/8d1d2084502334d8d691fb281906b8ab.php line 59

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