Web: fix CPU performance list

Since it is a read only page, use the replica if available. Fix the query that gets the data to correctly exclude old hosts.
This commit is contained in:
Christian Beer 2016-02-24 12:11:23 +01:00
parent d806276335
commit 1d1b2fdc61
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ function compare($a, $b) {
}
function get_data() {
$db = BoincDb::get();
$db = BoincDb::get(true);
// get CPU model status in a special query;
// enumerating hosts was too slow on SETI@home.
@ -43,7 +43,7 @@ function get_data() {
//
$x = $db->enum_fields('host', 'StdClass',
'p_model, count(*) as nhosts, avg(p_ncpus) as ncores, avg(p_fpops) as fpops',
'p_fpops>1e6 and p_fpops<1e11 and p_fpops <> 1e9 and expavg_credit>".MIND_CREDIT." group by p_model',
'p_fpops>1e6 and p_fpops<1e11 and p_fpops <> 1e9 and expavg_credit>'.MIN_CREDIT.' group by p_model',
null
);
$m2 = array();