186 lines
9.1 KiB
PHP
186 lines
9.1 KiB
PHP
<?php
|
|
|
|
use Twig\Environment;
|
|
use Twig\Error\LoaderError;
|
|
use Twig\Error\RuntimeError;
|
|
use Twig\Extension\CoreExtension;
|
|
use Twig\Extension\SandboxExtension;
|
|
use Twig\Markup;
|
|
use Twig\Sandbox\SecurityError;
|
|
use Twig\Sandbox\SecurityNotAllowedTagError;
|
|
use Twig\Sandbox\SecurityNotAllowedFilterError;
|
|
use Twig\Sandbox\SecurityNotAllowedFunctionError;
|
|
use Twig\Source;
|
|
use Twig\Template;
|
|
use Twig\TemplateWrapper;
|
|
|
|
/* @WebProfiler/Collector/memory.html.twig */
|
|
class __TwigTemplate_e6094f25a655dfe3ee369214c900bc2c extends Template
|
|
{
|
|
private Source $source;
|
|
/**
|
|
* @var array<string, Template>
|
|
*/
|
|
private array $macros = [];
|
|
|
|
public function __construct(Environment $env)
|
|
{
|
|
parent::__construct($env);
|
|
|
|
$this->source = $this->getSourceContext();
|
|
|
|
$this->blocks = [
|
|
'toolbar' => [$this, 'block_toolbar'],
|
|
];
|
|
}
|
|
|
|
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
|
|
{
|
|
// line 1
|
|
return "@WebProfiler/Profiler/layout.html.twig";
|
|
}
|
|
|
|
protected function doDisplay(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Collector/memory.html.twig"));
|
|
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@WebProfiler/Collector/memory.html.twig"));
|
|
|
|
$this->parent = $this->load("@WebProfiler/Profiler/layout.html.twig", 1);
|
|
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
|
|
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
|
|
|
|
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
|
|
|
|
}
|
|
|
|
// line 3
|
|
/**
|
|
* @return iterable<null|scalar|\Stringable>
|
|
*/
|
|
public function block_toolbar(array $context, array $blocks = []): iterable
|
|
{
|
|
$macros = $this->macros;
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "toolbar"));
|
|
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "toolbar"));
|
|
|
|
// line 4
|
|
yield " ";
|
|
$context["icon"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
|
|
// line 5
|
|
yield " ";
|
|
$context["status_color"] = (((((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.', 5, $this->source); })()), "memory", [], "any", false, false, false, 5) / 1024) / 1024) > 50)) ? ("yellow") : (""));
|
|
// line 6
|
|
yield " ";
|
|
yield Twig\Extension\CoreExtension::source($this->env, "@WebProfiler/Icon/memory.svg");
|
|
yield "
|
|
<span class=\"sf-toolbar-value\">";
|
|
// line 7
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::sprintf("%.1f", ((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); })()), "memory", [], "any", false, false, false, 7) / 1024) / 1024)), "html", null, true);
|
|
yield "</span>
|
|
<span class=\"sf-toolbar-label\">MiB</span>
|
|
";
|
|
yield from [];
|
|
})())) ? '' : new Markup($tmp, $this->env->getCharset());
|
|
// line 10
|
|
yield "
|
|
";
|
|
// line 11
|
|
$context["text"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
|
|
// line 12
|
|
yield " <div class=\"sf-toolbar-info-piece\">
|
|
<b>Peak memory usage</b>
|
|
<span>";
|
|
// line 14
|
|
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::sprintf("%.1f", ((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.', 14, $this->source); })()), "memory", [], "any", false, false, false, 14) / 1024) / 1024)), "html", null, true);
|
|
yield " MiB</span>
|
|
</div>
|
|
|
|
<div class=\"sf-toolbar-info-piece\">
|
|
<b>PHP memory limit</b>
|
|
<span>";
|
|
// line 19
|
|
yield (((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.', 19, $this->source); })()), "memoryLimit", [], "any", false, false, false, 19) == -1)) ? ("Unlimited") : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::sprintf("%.0f MiB", ((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.', 19, $this->source); })()), "memoryLimit", [], "any", false, false, false, 19) / 1024) / 1024)), "html", null, true)));
|
|
yield "</span>
|
|
</div>
|
|
";
|
|
yield from [];
|
|
})())) ? '' : new Markup($tmp, $this->env->getCharset());
|
|
// line 22
|
|
yield "
|
|
";
|
|
// line 23
|
|
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.', 23, $this->source); })()), "name" => "time", "status" => (isset($context["status_color"]) || array_key_exists("status_color", $context) ? $context["status_color"] : (function () { throw new RuntimeError('Variable "status_color" does not exist.', 23, $this->source); })())]);
|
|
yield "
|
|
";
|
|
|
|
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
|
|
|
|
|
|
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
|
|
|
|
yield from [];
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getTemplateName(): string
|
|
{
|
|
return "@WebProfiler/Collector/memory.html.twig";
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function isTraitable(): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function getDebugInfo(): array
|
|
{
|
|
return array ( 121 => 23, 118 => 22, 111 => 19, 103 => 14, 99 => 12, 97 => 11, 94 => 10, 87 => 7, 82 => 6, 79 => 5, 76 => 4, 63 => 3, 40 => 1,);
|
|
}
|
|
|
|
public function getSourceContext(): Source
|
|
{
|
|
return new Source("{% extends '@WebProfiler/Profiler/layout.html.twig' %}
|
|
|
|
{% block toolbar %}
|
|
{% set icon %}
|
|
{% set status_color = (collector.memory / 1024 / 1024) > 50 ? 'yellow' %}
|
|
{{ source('@WebProfiler/Icon/memory.svg') }}
|
|
<span class=\"sf-toolbar-value\">{{ '%.1f'|format(collector.memory / 1024 / 1024) }}</span>
|
|
<span class=\"sf-toolbar-label\">MiB</span>
|
|
{% endset %}
|
|
|
|
{% set text %}
|
|
<div class=\"sf-toolbar-info-piece\">
|
|
<b>Peak memory usage</b>
|
|
<span>{{ '%.1f'|format(collector.memory / 1024 / 1024) }} MiB</span>
|
|
</div>
|
|
|
|
<div class=\"sf-toolbar-info-piece\">
|
|
<b>PHP memory limit</b>
|
|
<span>{{ collector.memoryLimit == -1 ? 'Unlimited' : '%.0f MiB'|format(collector.memoryLimit / 1024 / 1024) }}</span>
|
|
</div>
|
|
{% endset %}
|
|
|
|
{{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, name: 'time', status: status_color }) }}
|
|
{% endblock %}
|
|
", "@WebProfiler/Collector/memory.html.twig", "/var/www/html/vendor/symfony/web-profiler-bundle/Resources/views/Collector/memory.html.twig");
|
|
}
|
|
}
|