function GetPageList($server_cfg, $game_cfg) { $xhprofModelObject = getXhProfModel(); $resArray = $xhprofModelObject->generic_execute_get_query_detail("cto_get_top_pages_by_delivery_time", array('end_time' => time(), 'start_time' => time() - 24 * 7 * 24 * 60 * 60)); global $PageList; $PageList = get_column_vector($resArray["rows"], 0); return true; }
function print_eu() { global $game_cfg; $xhprofModelObject = getXhProfModel(); $end_time = time(); $start_time = $end_time - 2 * 3600; $chart_result = $xhprofModelObject->generic_execute_get_query('bd_chart_range_per_dau', array('table' => $game_cfg["db_stats_table"], 'end_time' => $end_time, 'start_time' => $start_time, 'extra_params' => "")); $last2 = array_splice($chart_result, -2, 2); list($new, $old) = get_column_vector($last2, "dau_all_count"); $pct = 100 * ($new - $old) / $old; $diff = abs($new - $old); if ($diff >= 0) { $kind = "good"; $type = "more"; } else { $kind = "bad"; $type = "less"; } $arrow = get_arrow($kind); $pct = round(abs($pct), 2); echo <<<EOF \tServing <span class="{$kind}">{$new}</span> users per server <span class="{$kind}"> {$diff} {$type} {$arrow} ({$pct}%)</span> EOF; }