+ if ($G_profile == TRUE) {
+ $mtime_finish = microtime(TRUE);
+ $mtime_diff = ($mtime_finish - $mtime_start);
+ $mtime_idle = 100.0 * $mtsum_idle / $mtime_diff;
+ $mtime_read = 100.0 * $mtsum_read / $mtime_diff;
+ $mtime_garb = 100.0 * $mtsum_garb / $mtime_diff;
+ $mtime_unfi = 100.0 * $mtsum_unfi / $mtime_diff;
+ $mtime_mana = 100.0 * $mtsum_mana / $mtime_diff;
+
+ log_legal(time(), '127.0.0.1', FALSE, 'MAIN',
+ sprintf('LOG:PROF: tot(%.3f) idle: %.2f read: %.2f garb: %.2f unfi: %.2f mana: %.2f',
+ $mtime_diff, $mtime_idle, $mtime_read, $mtime_garb, $mtime_unfi, $mtime_mana
+ ));
+ $mtsum_idle = 0.0;
+ $mtsum_read = 0.0;
+ $mtsum_garb = 0.0;
+ $mtsum_unfi = 0.0;
+ $mtsum_mana = 0.0;
+ $mtime_start = $mtime_finish;
+ }