DatabaseCampaign: fix progress bar for >1 variant
Change-Id: I21843249830c67699214b6bed71f452b6ca03cb2
This commit is contained in:
@ -47,6 +47,11 @@ void CampaignManager::setTotalCount(uint64_t count)
|
||||
m_jobserver->setTotalCount(count);
|
||||
}
|
||||
|
||||
void CampaignManager::increaseTotalCount(uint64_t count)
|
||||
{
|
||||
m_jobserver->increaseTotalCount(count);
|
||||
}
|
||||
|
||||
void CampaignManager::skipJobs(uint64_t count)
|
||||
{
|
||||
m_jobserver->skipJobs(count);
|
||||
|
||||
@ -72,6 +72,7 @@ public:
|
||||
* in the database).
|
||||
*/
|
||||
void setTotalCount(uint64_t count);
|
||||
void increaseTotalCount(uint64_t count);
|
||||
void skipJobs(uint64_t count);
|
||||
/**
|
||||
* User campaign has finished.
|
||||
|
||||
@ -221,7 +221,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);
|
||||
campaignmanager.increaseTotalCount(experiment_count);
|
||||
|
||||
// abstraction of injection point:
|
||||
// must not be initialized in loop, because hop chain calculator would lose
|
||||
|
||||
@ -124,6 +124,7 @@ public:
|
||||
* in the database).
|
||||
*/
|
||||
void setTotalCount(uint64_t count) { m_TotalCount = count; }
|
||||
void increaseTotalCount(uint64_t count) { m_TotalCount = m_TotalCount.value_or(0) + count; }
|
||||
void skipJobs(uint64_t count) { ++m_DoneCount; /* FIXME assume atomic */ }
|
||||
/**
|
||||
* Checks whether there are no more experiment parameter sets.
|
||||
|
||||
Reference in New Issue
Block a user