DatabaseCampaign: fix log output
When no variants matching the command line parameters were found, the campaign printed an uninitialized sent_pilots count. Change-Id: Ib1d70ae86f02059daeb9a62567d6c83802e4986e
This commit is contained in:
@ -88,7 +88,6 @@ bool DatabaseCampaign::run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log_send << "pushed " << sent_pilots << " pilots into the queue" << std::endl;
|
|
||||||
log_send << "wait for the clients to complete" << std::endl;
|
log_send << "wait for the clients to complete" << std::endl;
|
||||||
campaignmanager.noMoreParameters();
|
campaignmanager.noMoreParameters();
|
||||||
|
|
||||||
@ -170,7 +169,7 @@ bool DatabaseCampaign::run_variant(Database::Variant variant) {
|
|||||||
log_send << "Found " << experiment_count << " unfinished experiments in database. ("
|
log_send << "Found " << experiment_count << " unfinished experiments in database. ("
|
||||||
<< variant.variant << "/" << variant.benchmark << ")" << std::endl;
|
<< variant.variant << "/" << variant.benchmark << ")" << std::endl;
|
||||||
|
|
||||||
sent_pilots = 0;
|
unsigned sent_pilots = 0;
|
||||||
while ((row = mysql_fetch_row(pilots)) != 0) {
|
while ((row = mysql_fetch_row(pilots)) != 0) {
|
||||||
unsigned pilot_id = strtoul(row[0], NULL, 10);
|
unsigned pilot_id = strtoul(row[0], NULL, 10);
|
||||||
unsigned injection_instr = strtoul(row[3], NULL, 10);
|
unsigned injection_instr = strtoul(row[3], NULL, 10);
|
||||||
@ -206,6 +205,7 @@ bool DatabaseCampaign::run_variant(Database::Variant variant) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log_send << "pushed " << sent_pilots << " pilots into the queue" << std::endl;
|
||||||
assert(experiment_count == sent_pilots && "ERROR: not all unfinished experiments pushed to queue");
|
assert(experiment_count == sent_pilots && "ERROR: not all unfinished experiments pushed to queue");
|
||||||
|
|
||||||
mysql_free_result(pilots);
|
mysql_free_result(pilots);
|
||||||
|
|||||||
@ -28,8 +28,6 @@ class DatabaseCampaign : public Campaign {
|
|||||||
|
|
||||||
void collect_result_thread();
|
void collect_result_thread();
|
||||||
|
|
||||||
int sent_pilots;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DatabaseCampaign() {};
|
DatabaseCampaign() {};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user