/** * Returns the next ProfilePeriod in time. */ public ProfilePeriod next() { return fromPeriodId(period + 1, durationMillis, TimeUnit.MILLISECONDS); }
public ProfileMeasurement toProfileMeasurement() { ProfilePeriod period = ProfilePeriod.fromPeriodId(periodId, durationMillis, TimeUnit.MILLISECONDS); ProfileMeasurement measurement = new ProfileMeasurement() .withProfileName(profileName) .withEntity(entity) .withPeriod(period) .withProfileValue(SerDeUtils.fromBytes(profileValue, Object.class)); return measurement; }