X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FRenderer.php;h=ad1717ae83f422495425179620632d673ed867b7;hb=fa55928ea3978e96bf1cc21f3759f5607f3ef503;hp=b6b443d5039a5b19ee08882ba95b934788ea06ba;hpb=5a87ccf0261733096f634cb03314604891e5f48a;p=friendica.git diff --git a/src/Core/Renderer.php b/src/Core/Renderer.php index b6b443d503..ad1717ae83 100644 --- a/src/Core/Renderer.php +++ b/src/Core/Renderer.php @@ -73,7 +73,7 @@ class Renderer */ public static function replaceMacros(string $template, array $vars = []) { - $stamp1 = microtime(true); + DI::profiler()->startRecording('rendering'); // pass $baseurl to all templates if it isn't set $vars = array_merge(['$baseurl' => DI::baseUrl()->get(), '$APP' => DI::app()], $vars); @@ -90,7 +90,7 @@ class Renderer throw new InternalServerErrorException($message); } - DI::profiler()->saveTimestamp($stamp1, "rendering"); + DI::profiler()->stopRecording(); return $output; } @@ -106,7 +106,7 @@ class Renderer */ public static function getMarkupTemplate($file, $subDir = '') { - $stamp1 = microtime(true); + DI::profiler()->startRecording('file'); $t = self::getTemplateEngine(); try { @@ -119,7 +119,7 @@ class Renderer throw new InternalServerErrorException($message); } - DI::profiler()->saveTimestamp($stamp1, "file"); + DI::profiler()->stopRecording(); return $template; }