mirror of https://github.com/BOINC/boinc.git
- client: update of time stats was broken by [17166]
svn path=/trunk/boinc/; revision=19009
This commit is contained in:
parent
ae3f3e74f1
commit
ed30b45a43
|
@ -7537,3 +7537,9 @@ David 5 Sept 2009
|
||||||
cpu_sched.cpp
|
cpu_sched.cpp
|
||||||
html/inc/
|
html/inc/
|
||||||
result.inc
|
result.inc
|
||||||
|
|
||||||
|
David 5 Sept 2009
|
||||||
|
- client: update of time stats was broken by [17166]
|
||||||
|
|
||||||
|
client/
|
||||||
|
time_stats.cpp
|
||||||
|
|
|
@ -166,8 +166,6 @@ void TIME_STATS::update(int suspend_reason) {
|
||||||
} else {
|
} else {
|
||||||
dt = gstate.now - last_update;
|
dt = gstate.now - last_update;
|
||||||
if (dt <= 10) return;
|
if (dt <= 10) return;
|
||||||
if (dt > 100) return;
|
|
||||||
// client must have been suspended; skip
|
|
||||||
w1 = 1 - exp(-dt/ALPHA); // weight for recent period
|
w1 = 1 - exp(-dt/ALPHA); // weight for recent period
|
||||||
w2 = 1 - w1; // weight for everything before that
|
w2 = 1 - w1; // weight for everything before that
|
||||||
// (close to zero if long gap)
|
// (close to zero if long gap)
|
||||||
|
@ -196,6 +194,13 @@ void TIME_STATS::update(int suspend_reason) {
|
||||||
sprintf(buf, "version %d.%d.%d", BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, BOINC_RELEASE);
|
sprintf(buf, "version %d.%d.%d", BOINC_MAJOR_VERSION, BOINC_MINOR_VERSION, BOINC_RELEASE);
|
||||||
log_append(buf, gstate.now);
|
log_append(buf, gstate.now);
|
||||||
log_append("power_on", gstate.now);
|
log_append("power_on", gstate.now);
|
||||||
|
} else if (dt > 100) {
|
||||||
|
// large dt - the client or host must have been suspended
|
||||||
|
on_frac *= w2;
|
||||||
|
log_append("proc_stop", last_update);
|
||||||
|
if (is_active) {
|
||||||
|
log_append("proc_start", gstate.now);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
on_frac = w1 + w2*on_frac;
|
on_frac = w1 + w2*on_frac;
|
||||||
if (connected_frac < 0) connected_frac = 0;
|
if (connected_frac < 0) connected_frac = 0;
|
||||||
|
|
Loading…
Reference in New Issue