public void updateFitness() {
    logger.info("Computing and updating fitness for completed executions");
    List<TuningJobExecutionParamSet> completedJobExecutionParamSets = getCompletedJobExecutionParamSets();
    updateExecutionMetrics(completedJobExecutionParamSets);
    updateMetrics(completedJobExecutionParamSets);

    Set<JobDefinition> jobDefinitionSet = new HashSet<JobDefinition>();
    for (TuningJobExecutionParamSet completedJobExecutionParamSet : completedJobExecutionParamSets) {
      JobDefinition jobDefinition = completedJobExecutionParamSet.jobSuggestedParamSet.jobDefinition;
      if (isTuningEnabled(jobDefinition.id)) {
        jobDefinitionSet.add(jobDefinition);
      }
    }
    checkToDisableTuning(jobDefinitionSet);
  }
Updates the metrics (execution time, resource usage, cost function) of the completed executions whose metrics are
not computed.
app/com/linkedin/drelephant/tuning/FitnessComputeUtil.java