- client: add <max_tasks_reported> config item:

limit the # of completed tasks reported per RPC

svn path=/trunk/boinc/; revision=22467
This commit is contained in:
David Anderson 2010-10-07 16:02:44 +00:00
parent 96f1252813
commit d7d2ebef85
4 changed files with 16 additions and 0 deletions

View File

@ -7155,3 +7155,11 @@ Rom 7 Oct 2010
/
configure.ac
version.h
David 7 Oct 2010
- client: add <max_tasks_reported> config item:
limit the # of completed tasks reported per RPC
client/
log_flags.cpp,h
cs_scheduler.cpp

View File

@ -246,6 +246,11 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
p->nresults_returned++;
rp->write(mf, true);
}
if (config.max_tasks_reported
&& (p->nresults_returned >= config.max_tasks_reported)
) {
break;
}
}
read_trickle_files(p, f);

View File

@ -275,6 +275,7 @@ void CONFIG::clear() {
max_file_xfers_per_project = MAX_FILE_XFERS_PER_PROJECT;
max_stderr_file_size = 0;
max_stdout_file_size = 0;
max_tasks_reported = 0;
ncpus = -1;
network_test_url = "http://www.google.com/";
no_alt_platform = false;
@ -385,6 +386,7 @@ int CONFIG::parse_options(XML_PARSER& xp) {
if (xp.parse_int(tag, "max_file_xfers_per_project", max_file_xfers_per_project)) continue;
if (xp.parse_int(tag, "max_stderr_file_size", max_stderr_file_size)) continue;
if (xp.parse_int(tag, "max_stdout_file_size", max_stdout_file_size)) continue;
if (xp.parse_int(tag, "max_tasks_reported", max_tasks_reported)) continue;
if (xp.parse_int(tag, "ncpus", ncpus)) continue;
if (xp.parse_string(tag, "network_test_url", network_test_url)) {
downcase_string(network_test_url);

View File

@ -131,6 +131,7 @@ struct CONFIG {
int max_file_xfers_per_project;
int max_stderr_file_size;
int max_stdout_file_size;
int max_tasks_reported;
int ncpus;
std::string network_test_url;
bool no_alt_platform;