diff --git a/checkin_notes b/checkin_notes index bb9dafc9b2..0fe6d317f2 100644 --- a/checkin_notes +++ b/checkin_notes @@ -7155,3 +7155,11 @@ Rom 7 Oct 2010 / configure.ac version.h + +David 7 Oct 2010 + - client: add config item: + limit the # of completed tasks reported per RPC + + client/ + log_flags.cpp,h + cs_scheduler.cpp diff --git a/client/cs_scheduler.cpp b/client/cs_scheduler.cpp index 5a202a44e1..1db5bf761c 100644 --- a/client/cs_scheduler.cpp +++ b/client/cs_scheduler.cpp @@ -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); diff --git a/client/log_flags.cpp b/client/log_flags.cpp index 55310db60b..8d51d8a389 100644 --- a/client/log_flags.cpp +++ b/client/log_flags.cpp @@ -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); diff --git a/client/log_flags.h b/client/log_flags.h index 657adebce0..b447932cad 100644 --- a/client/log_flags.h +++ b/client/log_flags.h @@ -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;