From fd04d92c48af61bad3978c3c0520bbaf0d695b83 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Sat, 22 Jun 2024 23:49:56 +0200 Subject: [PATCH] profile.php: reduce logging --- inc/profile.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/inc/profile.php b/inc/profile.php index 71b10ea0..709636c0 100644 --- a/inc/profile.php +++ b/inc/profile.php @@ -3,16 +3,13 @@ // Inject with `auto_prepend_file` in php.ini if (extension_loaded("excimer")) { - error_log("Profiler started", 0); - static $prof; // Keep object until the end of the request $prof = new ExcimerProfiler(); $prof->setEventType(EXCIMER_REAL); - $prof->setPeriod(5); // every N seconds + $prof->setPeriod(0.2); // every N seconds $prof->setMaxDepth(250); $prof->setFlushCallback(function ($log) { - error_log("Logged profile", 0); file_put_contents('/tmp/profles-ramfs/excimer-traces.log', $log->formatCollapsed(), FILE_APPEND | LOCK_EX); }, 1); $prof->start();