JobServer: print completion percentage and ETA

If the JobServer is provided a total number of experiments by the
campaign, it now prints a completion percentage and an estimated
remaining runtime along the usual progress reports.

Change-Id: Ibd781ba8bff9af3a85683bbd29728216e316da57
This commit is contained in:
Horst Schirmeier
2018-08-03 18:24:36 +02:00
parent f89794329c
commit a547b0d5b4
5 changed files with 46 additions and 1 deletions

View File

@ -215,6 +215,7 @@ bool DatabaseCampaign::run_variant(Database::Variant variant) {
log_send << "Found " << experiment_count << " jobs in database. ("
<< variant.variant << "/" << variant.benchmark << ")" << std::endl;
campaignmanager.setTotalCount(experiment_count);
// abstraction of injection point:
// must not be initialized in loop, because hop chain calculator would lose
@ -229,6 +230,7 @@ bool DatabaseCampaign::run_variant(Database::Variant variant) {
unsigned pilot_id = strtoul(row[0], NULL, 10);
if (existing_results_for_pilot(pilot_id) == expected_results) {
skipped_pilots++;
campaignmanager.skipJobs(1);
continue;
}