mirror of https://github.com/BOINC/boinc.git
- client: add "Suspending computation" messages for
system idle and initial delay cases. Rom: please back-port svn path=/trunk/boinc/; revision=15513
This commit is contained in:
parent
69bca8a999
commit
b21be7c4d4
|
@ -5238,3 +5238,11 @@ David 27 June 2008
|
|||
|
||||
tools/
|
||||
make_project
|
||||
|
||||
David 29 June 2008
|
||||
- client: add "Suspending computation" messages for
|
||||
system idle and initial delay cases.
|
||||
Rom: please back-port
|
||||
|
||||
client/
|
||||
cs_prefs.C
|
||||
|
|
|
@ -180,6 +180,12 @@ static string reason_string(int reason) {
|
|||
if (reason & SUSPEND_REASON_DISK_SIZE) {
|
||||
s_reason += " - out of disk space - change global prefs";
|
||||
}
|
||||
if (reason & SUSPEND_REASON_NO_RECENT_INPUT) {
|
||||
s_reason += " - no recent user activity";
|
||||
}
|
||||
if (reason & SUSPEND_REASON_INITIAL_DELAY) {
|
||||
s_reason += " - initial delay";
|
||||
}
|
||||
return s_reason;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,17 @@ class BoltDb extends DbConn {
|
|||
}
|
||||
if (!isset($instance)) {
|
||||
$config = get_config();
|
||||
$user = parse_config($config, '<bolt_db_user>');
|
||||
$passwd = parse_config($config, '<bolt_db_passwd>');
|
||||
$host = parse_config($config, '<bolt_db_host>');
|
||||
$name = parse_config($config, '<bolt_db_name>');
|
||||
if (!$name) {
|
||||
$name = parse_config($config, '<db_name>');
|
||||
$user = parse_config($config, '<db_user>');
|
||||
$passwd = parse_config($config, '<db_passwd>');
|
||||
$host = parse_config($config, '<db_host>');
|
||||
} else {
|
||||
$user = parse_config($config, '<bolt_db_user>');
|
||||
$passwd = parse_config($config, '<bolt_db_passwd>');
|
||||
$host = parse_config($config, '<bolt_db_host>');
|
||||
}
|
||||
if ($host == null) {
|
||||
$host = "localhost";
|
||||
}
|
||||
|
|
|
@ -335,7 +335,7 @@ function test_stats() {
|
|||
|
||||
//////////// graph drawing
|
||||
|
||||
function bar($title, $n, $width, $lo, $hi) {
|
||||
function compare_bar($title, $n, $width, $lo, $hi) {
|
||||
$x1 = $width*$lo;
|
||||
$x2 = $width*($hi-$lo);
|
||||
$a1 = number_format($lo*100);
|
||||
|
@ -354,7 +354,7 @@ function bar($title, $n, $width, $lo, $hi) {
|
|||
";
|
||||
}
|
||||
|
||||
function bar_insuff($title, $width) {
|
||||
function compare_bar_insuff($title, $width) {
|
||||
return "
|
||||
<tr>
|
||||
<td>$title</td>
|
||||
|
|
|
@ -13,10 +13,17 @@ class BossaDb extends DbConn {
|
|||
static function get() {
|
||||
if (!isset($instance)) {
|
||||
$config = get_config();
|
||||
$user = parse_config($config, '<bossa_db_user>');
|
||||
$passwd = parse_config($config, '<bossa_db_passwd>');
|
||||
$host = parse_config($config, '<bossa_db_host>');
|
||||
$name = parse_config($config, '<bossa_db_name>');
|
||||
if (!$name) {
|
||||
$name = parse_config($config, '<db_name>');
|
||||
$user = parse_config($config, '<db_user>');
|
||||
$passwd = parse_config($config, '<db_passwd>');
|
||||
$host = parse_config($config, '<db_host>');
|
||||
} else {
|
||||
$user = parse_config($config, '<bossa_db_user>');
|
||||
$passwd = parse_config($config, '<bossa_db_passwd>');
|
||||
$host = parse_config($config, '<bossa_db_host>');
|
||||
}
|
||||
if ($host == null) {
|
||||
$host = "localhost";
|
||||
}
|
||||
|
|
|
@ -48,14 +48,14 @@ function compare_case(
|
|||
$scores = $a[$child->name];
|
||||
$n = count($scores);
|
||||
if ($n < 2) {
|
||||
$x = bar_insuff($child->name, 600);
|
||||
$x = compare_bar_insuff($child->name, 600);
|
||||
} else {
|
||||
conf_int_90($scores, $lo, $hi);
|
||||
//$x = "($lo, $hi) ($n results)";
|
||||
$x = bar($child->name, $n, 600, $lo, $hi);
|
||||
$x = compare_bar($child->name, $n, 600, $lo, $hi);
|
||||
}
|
||||
} else {
|
||||
$x = bar_insuff($child->name, 600);
|
||||
$x = compare_bar_insuff($child->name, 600);
|
||||
}
|
||||
echo $x;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue