code: private GetMetricStatisticsResponse getMetricStatistics(final String[] statistics,
              final DateTime startTime,
              final DateTime endTime, final int period, final String metricName) {
          GetMetricStatisticsResponse ret = new GetMetricStatisticsResponse();
          GetMetricStatisticsResult result = new GetMetricStatisticsResult();
          Datapoints dataPoints = new Datapoints();
  
          int dataPointsCount = Seconds.secondsBetween(startTime, endTime).getSeconds() / period;
          DateTime newDate = startTime;
          for (int counterDp = 0; counterDp < dataPointsCount; counterDp++) {
              Datapoint dp = new Datapoint();
              DateTime timeStamp = newDate.plusSeconds(period);
              XMLGregorianCalendar timeStampXml = toXMLGregorianCalendar(timeStamp);
              dp.setTimestamp(timeStampXml);
              dp.setAverage(getMetricAverageValue(metricName));
              dp.setSampleCount(getMetricSampleCountValue(metricName));
              dp.setUnit(getMetricUnit(metricName));
              dataPoints.getMember().add(dp);
              newDate = timeStamp;
          }
  
          result.setDatapoints(dataPoints);
          result.setLabel(metricName);
          ret.setGetMetricStatisticsResult(result);
          ResponseMetadata responseMetadata = new ResponseMetadata();
          responseMetadata.setRequestId(UUID.randomUUID().toString());
          ret.setResponseMetadata(responseMetadata);
          return ret;
      }
docs: Handles "GetMetricStatistics" request, as simple as without any filters
  to use.
  
  @param statistics
  Metric statistics.
  @param startTime
  Metric statistics start time.
  @param endTime
  Metric statistics end time.
  @param period
  Metric collection period.
  @param metricName
  Metric Name.
  @return a GetMetricStatisticsResult for metricName.