code: @Override
      public JobReport mergerReports(JobReport... jobReports) {
  
          List<Long> startTimes = new ArrayList<>();
          List<Long> endTimes = new ArrayList<>();
          List<String> jobNames = new ArrayList<>();
  
          JobParameters parameters = new JobParameters();
          JobMetrics metrics = new JobMetrics();
          JobReport finalJobReport = new JobReport();
          finalJobReport.setParameters(parameters);
          finalJobReport.setMetrics(metrics);
          finalJobReport.setStatus(JobStatus.COMPLETED);
  
          for (JobReport jobReport : jobReports) {
              startTimes.add(jobReport.getMetrics().getStartTime());
              endTimes.add(jobReport.getMetrics().getEndTime());
              calculateReadRecords(finalJobReport, jobReport);
              calculateWrittenRecords(finalJobReport, jobReport);
              calculateFilteredRecords(finalJobReport, jobReport);
              calculateErrorRecords(finalJobReport, jobReport);
              setStatus(finalJobReport, jobReport);
              jobNames.add(jobReport.getJobName());
              finalJobReport.setSystemProperties(jobReport.getSystemProperties()); // works unless partial jobs are run in different JVMs..
          }
  
          //merge results
          finalJobReport.getMetrics().setStartTime(Collections.min(startTimes));
          finalJobReport.getMetrics().setEndTime(Collections.max(endTimes));
  
          // set name
          finalJobReport.setJobName(concatenate(jobNames));
  
          return finalJobReport;
      }
docs: Merge multiple reports into a consolidated one.
  
  @param jobReports reports to merge
  @return a merged report