private void generateReportsFor(Collection<ReportingTask> reportingTasks) throws IOException { stopwatch.start(); try { Reporter.generateReportsFor(reportingTasks); final List<Callable<Void>> partitions = Lists.newArrayList(); for (ReportingTask reportingTask : reportingTasks) { partitions.add(new ReportExecutor(reportingTask)); } final ExecutorService executorPool = Executors.newFixedThreadPool(NumberOfThreads.forIOOperations()); for (Future<Void> executedTask : executorPool.invokeAll(partitions)) { executedTask.get(); } } catch (Exception e) { LOGGER.error("Report generation failed", e); } LOGGER.debug("Test outcome reports generated in {} ms", stopwatch.stop()); }