use of org.evosuite.continuous.job.JobDefinition in project evosuite by EvoSuite.
the class ScheduleType method createScheduleForWhenNotEnoughBudget.
/**
* if there is not enough search budget, then try
* to target as many CUTs as possible
* @return
*/
protected List<JobDefinition> createScheduleForWhenNotEnoughBudget() {
ProjectStaticData data = scheduler.getProjectData();
int totalBudget = 60 * scheduler.getConfiguration().timeInMinutes * scheduler.getConfiguration().getNumberOfUsableCores();
List<JobDefinition> jobs = new LinkedList<JobDefinition>();
// not enough budget
for (ClassInfo info : data.getClassInfos()) {
if (!info.isTestable()) {
continue;
}
JobDefinition job = new JobDefinition(60 * scheduler.getConfiguration().minMinutesPerJob, scheduler.getConfiguration().getConstantMemoryPerJob(), info.getClassName(), 0, null, null);
jobs.add(job);
totalBudget -= (60 * scheduler.getConfiguration().minMinutesPerJob);
if (totalBudget <= 0) {
break;
}
}
return jobs;
}
Aggregations