/** * method make_stats * param * return builds the statistics */ public static function make_stats() { // INITIAL TIME $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; self::$time = time(); // INITIAL MEMORY $result['initial_memory'] = array(round(memory_get_usage() / 1024, 1), round(memory_get_usage(1) / 1024, 1)); // MAKE STATISTICS FOR USERS self::make_user_rank(); // MAKE STATISTICS FOR ALLIANCE self::make_ally_rank(); // END STATISTICS BUILD $mtime = microtime(); $mtime = explode(" ", $mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $result['stats_time'] = self::$time; $result['totaltime'] = $endtime - $starttime; $result['memory_peak'] = array(round(memory_get_peak_usage() / 1024, 1), round(memory_get_peak_usage(1) / 1024, 1)); $result['end_memory'] = array(round(memory_get_usage() / 1024, 1), round(memory_get_usage(1) / 1024, 1)); return $result; }