public Collection fetch()

in src/main/java/com/microsoft/dhalion/sensors/BasicSensor.java [94:106]


  public Collection<Measurement> fetch() {
    Instant startTime = context.checkpoint();
    Duration duration = getDuration();
    Collection<String> metrics = getMetricTypes();
    LOG.fine(String.format("Trying to fetch %s @ %s for %s duration", getMetricTypes(), startTime, duration));

    Collection<Measurement> measurements
        = metricsProvider.getMeasurements(startTime, duration, metrics, getComponents());
    if (LOG.isLoggable(Level.FINEST)) {
      measurements.stream().map(Object::toString).forEach(LOG::finest);
    }
    return measurements;
  }