@Override
  public void dumpResults() {

    lastDumpTime = System.currentTimeMillis();
    Set<String> operations = new TreeSet<>(this.operationTimings.keySet());
    Map<String, Long> metrics = new HashMap<>();

    for (String operation : operations) {

      String[] splits = operation.split(":");

      Object value = this.operationTimings.get(operation);
      if (value == null) {
        value = Long.valueOf(0);
      }
      //Cleaning up metric names.
      if (value instanceof Long) {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < splits.length; i++) {
          //Removing full package paths from Entity names
          if (splits[i].startsWith(entityPackagePrefix)) {
            String[] queryClassSplits = splits[i].split("\\.");
            list.add(queryClassSplits[queryClassSplits.length - 1]);
          } else if (splits[i] != null && !splits[i].equals("null")) {
            //Removing nulls in metric names.
            list.add(splits[i]);
          }
        }
        //Joining metric name portions by "." delimiter.
        metrics.put(StringUtils.join(list, "."), (Long)value);
      }
    }
    if (!metrics.isEmpty()) {
      if (!isInitialized) {
        init();
      }
      if (isInitialized) {
        LOG.debug("Publishing {} metrics to sink.", metrics.size());
        metricsSource.publish(metrics);
      }
    }
  }
Overridden dump metrics method for dumping Metrics to source rather than writing to Log file.
ambari-server/src/main/java/org/apache/ambari/server/metrics/system/impl/AmbariPerformanceMonitor.java