- Logger::log(
- 'DB: '.number_format(self::$db_duration, 2).
- ' - Lock: '.number_format(self::$lock_duration, 2).
- ' - Rest: '.number_format($up_duration - self::$db_duration - self::$lock_duration, 2).
- ' - Execution: '.number_format($duration, 2),
- Logger::DEBUG
- );
+ $dbtotal = round(self::$db_duration, 2);
+ $dbread = round(self::$db_duration - (self::$db_duration_count + self::$db_duration_write + self::$db_duration_stat), 2);
+ $dbcount = round(self::$db_duration_count, 2);
+ $dbstat = round(self::$db_duration_stat, 2);
+ $dbwrite = round(self::$db_duration_write, 2);
+ $dblock = round(self::$lock_duration, 2);
+ $rest = round(max(0, $up_duration - (self::$db_duration + self::$lock_duration)), 2);
+ $exec = round($duration, 2);
+
+ Logger::info('Performance:', ['mode' => self::$mode, 'count' => $dbcount, 'stat' => $dbstat, 'write' => $dbwrite, 'lock' => $dblock, 'total' => $dbtotal, 'rest' => $rest, 'exec' => $exec]);