@Override
  public String toString() {
    StringBuilder sb = new StringBuilder("TimelineMetricsCacheValue {" +
      ", startTime = " + new Date(getMillisecondsTime(startTime)) +
      ", endTime = " + new Date(getMillisecondsTime(endTime)) +
      ", precision = " + precision +
      ", timelineMetrics =");

    for (TimelineMetric metric : timelineMetrics.getMetrics()) {
      sb.append(" { ");
      sb.append(metric.getMetricName());
      sb.append(", ");
      sb.append(metric.getHostName());
      sb.append(" # ");
      sb.append(metric.getMetricValues().size());
      sb.append(" }");
    }

    sb.append("}");
    return sb.toString();
  }
Map of metricName to metric values. Works on the assumption that metric
name is unique
ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricsCacheValue.java