use of org.apache.servicecomb.foundation.metrics.meter.PeriodMeter in project java-chassis by ServiceComb.
the class GlobalRegistry method poll.
public PolledEvent poll(long secondInterval) {
long msNow = clock.wallTime();
List<Meter> meters = new ArrayList<>();
List<Measurement> measurements = new ArrayList<>();
for (Registry registry : registries) {
SpectatorUtils.removeExpiredMeters(registry);
for (Meter meter : registry) {
if (meter instanceof PeriodMeter) {
((PeriodMeter) meter).calcMeasurements(msNow, secondInterval);
}
meters.add(meter);
meter.measure().forEach(measurements::add);
}
}
return new PolledEvent(meters, measurements);
}
use of org.apache.servicecomb.foundation.metrics.meter.PeriodMeter in project incubator-servicecomb-java-chassis by apache.
the class GlobalRegistry method poll.
public PolledEvent poll(long secondInterval) {
long msNow = clock.wallTime();
List<Meter> meters = new ArrayList<>();
List<Measurement> measurements = new ArrayList<>();
for (Registry registry : registries) {
SpectatorUtils.removeExpiredMeters(registry);
for (Meter meter : registry) {
if (meter instanceof PeriodMeter) {
((PeriodMeter) meter).calcMeasurements(msNow, secondInterval);
}
meters.add(meter);
meter.measure().forEach(measurements::add);
}
}
return new PolledEvent(meters, measurements);
}
Aggregations