mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4848
This commit is contained in:
parent
39f42d5f85
commit
f5a552e006
|
@ -21289,3 +21289,8 @@ David 14 Dec 2004
|
|||
win_build/
|
||||
upper_case.vcproj
|
||||
|
||||
David 13 Dec 2004
|
||||
- Added code to validator to maintain host.avg_turnaround
|
||||
|
||||
sched/
|
||||
validator.C
|
||||
|
|
|
@ -105,10 +105,19 @@ int grant_credit(RESULT& result, double credit) {
|
|||
|
||||
host.total_credit += credit;
|
||||
update_average(result.sent_time, credit, CREDIT_HALF_LIFE, host.expavg_credit, host.expavg_time);
|
||||
|
||||
double turnaround = result.received_time - result.sent_time;
|
||||
if (host.avg_turnaround == 0) {
|
||||
host.avg_turnaround = turnaround;
|
||||
} else {
|
||||
host.avg_turnaround = .7*host.avg_turnaround + .3*turnaround;
|
||||
}
|
||||
|
||||
sprintf(
|
||||
buf, "total_credit=%f, expavg_credit=%f, expavg_time=%f",
|
||||
host.total_credit, host.expavg_credit,
|
||||
host.expavg_time
|
||||
buf,
|
||||
"total_credit=%f, expavg_credit=%f, expavg_time=%f, avg_turnaround=%f",
|
||||
host.total_credit, host.expavg_credit, host.expavg_time,
|
||||
host.avg_turnaround
|
||||
);
|
||||
retval = host.update_field(buf);
|
||||
if (retval) {
|
||||
|
|
Loading…
Reference in New Issue