From fd876d28e21c3bcaba7981d48e277368423592a0 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 23 Apr 2024 18:19:22 +0300 Subject: [PATCH] Printing execution times alongside to workers --- config.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.inc.php b/config.inc.php index 2e219b2..8196c77 100644 --- a/config.inc.php +++ b/config.inc.php @@ -581,6 +581,7 @@ function _config_worker_func(array $job, array $includes_map, bool $force, bool if(is_callable($CONFIG_INIT_WORKER_FUNC)) $CONFIG_INIT_WORKER_FUNC(); + $start_time = microtime(true); list($idx, $files) = $job; if($verbose) echo "Worker $idx (" . sizeof($files) . ") started\n"; @@ -607,7 +608,7 @@ function _config_worker_func(array $job, array $includes_map, bool $force, bool $results[$file] = array($cache_file, $is_stale); } if($verbose) - echo "Worker $idx done\n"; + echo "Worker $idx done (".round(microtime(true)-$start_time, 2)." sec)\n"; return $results; }