/*rts*/protected static function rts_print () /*rts*/{ /*rts*/ self::$rts_total_runtime = microtime(true) - self::$rts_startup_stamp; /*rts*/ if (!self::$rts_verbosity) return; /*rts*/ print(self::$rts_prefix); /*rts*/ /*rts*/ { /*rts*/ printf("Total running time : %f sec (100%%)\n", /*rts*/ self::$rts_total_runtime); /*rts*/ } /*rts*/ { /*rts*/ $t = self::$rts_time_for_loads; /*rts*/ $c = self::$rts_count_of_loads; /*rts*/ printf("Loading of php-files: %f sec (%2.0f%%); %3d files loaded.\n", /*rts*/ $t, 100.0 * $t / self::$rts_total_runtime, $c); /*rts*/ } /*rts*/ print("\n"); /*rts*/ /*rts*/ print("Per stages:\n"); /*rts*/ $all_count = $all_time = $maxlength = 0; $list = array(); /*rts*/ foreach (self::$rts_time_for_stage as $stage => $unused_variable) /*rts*/ { /*rts*/ $title = "'{$stage}'"; /*rts*/ $all_count += $count = 1; /*rts*/ $all_time += $time = self::$rts_time_for_stage[$stage]; /*rts*/ $maxlength = max($maxlength, strlen($title)); /*rts*/ $list[$title] = array($title, $count, $time); /*rts*/ } /*rts*/ foreach ($list as $item) /*rts*/ { /*rts*/ list($title, $count, $time) = $item; /*rts*/ printf("Time in stage %-{$maxlength}s: %f sec (%2.0f%%).\n", /*rts*/ $title, $time, 100.0 * $time / self::$rts_total_runtime); /*rts*/ } /*rts*/ { /*rts*/ printf("Time in stages%-{$maxlength}s: %f sec (%2.0f%%).\n", /*rts*/ '', $all_time, 100.0 * $all_time / self::$rts_total_runtime); /*rts*/ } /*rts*/ print("\n"); /*rts*/ /*rts*/ print("Per modules:\n"); /*rts*/ $all_count = $all_time = $maxlength = 0; $list = array(); /*rts*/ foreach (self::$rts_time_for_module as $module => $unused_variable) /*rts*/ { /*rts*/ $title = "'{$module}'"; /*rts*/ $all_count += $count = self::$rts_count_of_module[$module]; /*rts*/ $all_time += $time = self::$rts_time_for_module[$module]; /*rts*/ $maxlength = max($maxlength, strlen($title)); /*rts*/ $list[$title] = array($title, $count, $time); /*rts*/ } /*rts*/ ksort($list, SORT_STRING); /*rts*/ foreach ($list as $item) /*rts*/ { /*rts*/ list($title, $count, $time) = $item; /*rts*/ printf("Time in module %-{$maxlength}s: %f sec (%2.0f%%); called %3d times.\n", /*rts*/ $title, $time, 100.0 * $time / self::$rts_total_runtime, $count); /*rts*/ } /*rts*/ { /*rts*/ printf("Time in modules%-{$maxlength}s: %f sec (%2.0f%%); called %3d times.\n", /*rts*/ '', $all_time, 100.0 * $all_time / self::$rts_total_runtime, $all_count); /*rts*/ } /*rts*/ print("\n"); /*rts*/ /*rts*/ print("Per methods:\n"); /*rts*/ $all_count = $all_time = $maxlength = 0; $list = array(); /*rts*/ foreach (self::$rts_time_for_method as $module => $unused_variable_1) /*rts*/ foreach (self::$rts_time_for_method[$module] as $method => $unused_variable_2) /*rts*/ { /*rts*/ $title = "'{$module}::{$method}'"; /*rts*/ $all_count += $count = self::$rts_count_of_method[$module][$method]; /*rts*/ $all_time += $time = self::$rts_time_for_method[$module][$method]; /*rts*/ $maxlength = max($maxlength, strlen($title)); /*rts*/ $list[$title] = array($title, $count, $time); /*rts*/ } /*rts*/ ksort($list, SORT_STRING); /*rts*/ foreach ($list as $item) /*rts*/ { /*rts*/ list($title, $count, $time) = $item; /*rts*/ printf("Time in method %-{$maxlength}s: %f sec (%2.0f%%); called %3d times.\n", /*rts*/ $title, $time, 100.0 * $time / self::$rts_total_runtime, $count); /*rts*/ } /*rts*/ { /*rts*/ printf("Time in methods%-{$maxlength}s: %f sec (%2.0f%%); called %3d times.\n", /*rts*/ '', $all_time, 100.0 * $all_time / self::$rts_total_runtime, $all_count); /*rts*/ } /*rts*/ print("\n"); /*rts*/ /*rts*/ print("Per coren calls:\n"); /*rts*/ $all_count = $all_time = $maxlength = 0; $list = array(); /*rts*/ foreach (self::$rts_count_of_coren as $method => $unused_variable) /*rts*/ { /*rts*/ $title = "'{$method}'"; /*rts*/ $all_count += $count = self::$rts_count_of_coren[$method]; /*rts*/ $all_time += $time = 0; /*rts*/ $maxlength = max($maxlength, strlen($title)); /*rts*/ $list[$title] = array($title, $count, $time); /*rts*/ } /*rts*/ ksort($list, SORT_STRING); /*rts*/ foreach ($list as $item) /*rts*/ { /*rts*/ list($title, $count, $time) = $item; /*rts*/ printf("Coren method %-{$maxlength}s called %3d times.\n", /*rts*/ $title, $count); /*rts*/ } /*rts*/ { /*rts*/ printf("Coren methods%-{$maxlength}s called %3d times.\n", /*rts*/ '', $all_count); /*rts*/ } /*rts*/ print("\n"); /*rts*/ /*rts*/ print(self::$rts_suffix); /*rts*/}