diff --git a/checkin_notes b/checkin_notes index 940dbfe97c..886df21c8a 100755 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/sched/validator.C b/sched/validator.C index 38c3d45424..99594c953b 100644 --- a/sched/validator.C +++ b/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) {