code: private Map<String,Long> getCalculatedMetrics(Map<String,Object> metrics) {
  
          long errorsPerMinVal = 0;
          long callsPerMinVal = 0;
          Map<String,Long> calculatedMetrics = new HashMap<>();
          Iterator it = metrics.keySet().iterator();
          while(it.hasNext()){
              String key = (String)it.next();
              if(key.equals(ERRORS_PER_MINUTE)){
                  errorsPerMinVal = (long) metrics.get(key);
              }
  
              if(key.equals(CALLS_PER_MINUTE)){
                  callsPerMinVal = (long) metrics.get(key);
              }
  
          }
          // Total Errors
          // Right now the timeframe is hard-coded to 15 min. Change this if that changes.
          calculatedMetrics.put(TOTAL_ERRORS,errorsPerMinVal * 15);
  
          // Total Calls
          // Right now the timeframe is hard-coded to 15 min. Change this if that changes.
          calculatedMetrics.put(TOTAL_CALLS,callsPerMinVal * 15);
  
          return calculatedMetrics;
      }
docs: Some metrics are not immediately available (e.g. Total Calls, Total Errors). We need to calculate them.
  
  @param metrics the already-populated list of metrics. We use this data to calculate new values.
  @return List of PerformanceMetrics used to populate the performance database