diff --git a/src/TwigComponent/src/DataCollector/TwigComponentDataCollector.php b/src/TwigComponent/src/DataCollector/TwigComponentDataCollector.php index 75af72f9bd7..874bb7bf74e 100644 --- a/src/TwigComponent/src/DataCollector/TwigComponentDataCollector.php +++ b/src/TwigComponent/src/DataCollector/TwigComponentDataCollector.php @@ -88,9 +88,9 @@ public function getRenderCount(): int return $this->data['render_count'] ?? 0; } - public function getRenderTime(): int + public function getRenderTime(): float { - return $this->data['render_time'] ?? 0; + return (float) ($this->data['render_time'] ?? 0); } private function collectDataFromLogger(): void @@ -149,7 +149,7 @@ private function collectDataFromLogger(): void $renders[$renderId] += [ 'render_end' => $profile[0], 'render_time' => $renderTime, - 'render_memory' => $profile[1], + 'render_memory' => (int) $profile[1], ]; ++$components[$componentName]['render_count']; diff --git a/src/TwigComponent/templates/Collector/twig_component.html.twig b/src/TwigComponent/templates/Collector/twig_component.html.twig index cbe725d6ac0..fe6ded6a412 100644 --- a/src/TwigComponent/templates/Collector/twig_component.html.twig +++ b/src/TwigComponent/templates/Collector/twig_component.html.twig @@ -125,7 +125,7 @@
{% endset %} @@ -165,7 +165,7 @@