From 3a632ee048d99b1313dc571fe29c35300693ac17 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Fri, 8 Aug 2003 23:41:36 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2048 --- client/cs_scheduler.C | 3 ++- client/hostinfo.C | 24 ++++++++++-------------- client/hostinfo.h | 19 +++++++------------ 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C index e64bad1f71..8126f27d20 100644 --- a/client/cs_scheduler.C +++ b/client/cs_scheduler.C @@ -70,7 +70,8 @@ double CLIENT_STATE::current_work_buf_days() { double CLIENT_STATE::work_needed_secs() { double x = current_work_buf_days(); if (x > global_prefs.work_buf_max_days) return 0; - return (global_prefs.work_buf_max_days - x)*SECONDS_PER_DAY; + return (global_prefs.work_buf_max_days - x)*SECONDS_PER_DAY + * time_stats.active_frac * host_info.p_ncpus; } // update exponentially-averaged CPU times of all projects diff --git a/client/hostinfo.C b/client/hostinfo.C index 307dfaa70c..4adf3c74a1 100644 --- a/client/hostinfo.C +++ b/client/hostinfo.C @@ -2,18 +2,18 @@ // Version 1.0 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at // http://boinc.berkeley.edu/license_1.0.txt -// +// // Software distributed under the License is distributed on an "AS IS" // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the // License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// // The Initial Developer of the Original Code is the SETI@home project. // Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// +// University of California at Berkeley. All Rights Reserved. +// // Contributor(s): // @@ -55,10 +55,6 @@ void clear_host_info(HOST_INFO& host) { strcpy(host.serialnum, ""); strcpy(host.ip_addr, ""); - host.on_frac = 0; - host.conn_frac = 0; - host.active_frac = 0; - host.p_ncpus = 0; strcpy(host.p_vendor, ""); strcpy(host.p_model, ""); @@ -69,7 +65,7 @@ void clear_host_info(HOST_INFO& host) { host.p_iop_err = 0; host.p_membw_err = 0; host.p_calculated = 0; - + strcpy(host.os_name, ""); strcpy(host.os_version, ""); @@ -152,7 +148,7 @@ int HOST_INFO::write(FILE* out) { p_fpop_err, p_iop_err, p_membw_err, - p_calculated, + p_calculated, os_name, os_version, m_nbytes, @@ -206,7 +202,7 @@ int HOST_INFO::write_cpu_benchmarks(FILE* out) { p_fpop_err, p_iop_err, p_membw_err, - p_calculated, + p_calculated, m_cache ); return 0; diff --git a/client/hostinfo.h b/client/hostinfo.h index 31192679ff..50386a8c8a 100644 --- a/client/hostinfo.h +++ b/client/hostinfo.h @@ -2,18 +2,18 @@ // Version 1.0 (the "License"); you may not use this file except in // compliance with the License. You may obtain a copy of the License at // http://boinc.berkeley.edu/license_1.0.txt -// +// // Software distributed under the License is distributed on an "AS IS" // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the // License for the specific language governing rights and limitations -// under the License. -// -// The Original Code is the Berkeley Open Infrastructure for Network Computing. -// +// under the License. +// +// The Original Code is the Berkeley Open Infrastructure for Network Computing. +// // The Initial Developer of the Original Code is the SETI@home project. // Portions created by the SETI@home project are Copyright (C) 2002 -// University of California at Berkeley. All Rights Reserved. -// +// University of California at Berkeley. All Rights Reserved. +// // Contributor(s): // @@ -30,11 +30,6 @@ struct HOST_INFO { char serialnum[256]; char ip_addr[256]; - //exponentially weighted fractions - double on_frac; - double conn_frac; - double active_frac; - int p_ncpus; char p_vendor[256]; char p_model[256];