use of com.github.diegopacheco.dynomite.cluster.checker.tasks.GetJsonReportResultTask in project dynomite-cluster-checker by diegopacheco.
the class DCCTaskExecutionEngine method run.
@SuppressWarnings("unchecked")
public String run(String seeds, boolean telemetryMode) {
ExecutionContext ec = injector.getInstance(ExecutionContext.class);
Chronometer stopWatch = injector.getInstance(Chronometer.class);
stopWatch.start();
ec.setRawSeeds(seeds);
ec.setIsTelemetryMode(telemetryMode);
List<Task> tasks = injector.getInstance(Key.get(List.class, Names.named("tasks")));
for (Task t : tasks) {
t.execute(ec);
}
stopWatch.stop();
ec.getExecutionReport().setTimeToRun(stopWatch.getDiffAsString());
GetJsonReportResultTask jsonFinalReportTask = injector.getInstance(GetJsonReportResultTask.class);
jsonFinalReportTask.execute(ec);
return ec.getExecutionReport().getJsonResult();
}
Aggregations