@Test public void checkInitialBucketCreation() { FixedSizeSlidingWindowMetrics metrics = new FixedSizeSlidingWindowMetrics(5); Snapshot snapshot = metrics.getSnapshot(); assertThat(snapshot.getTotalNumberOfCalls()).isEqualTo(0); assertThat(snapshot.getNumberOfSuccessfulCalls()).isEqualTo(0); assertThat(snapshot.getNumberOfFailedCalls()).isEqualTo(0); assertThat(snapshot.getTotalDuration().toMillis()).isEqualTo(0); }
public synchronized Snapshot getSnapshot() { return new SnapshotImpl(totalAggregation); }
FixedSizeSlidingWindowMetrics implements Metrics { public synchronized Snapshot getSnapshot() { return new SnapshotImpl(totalAggregation); } }
FixedSizeSlidingWindowMetrics implements Metrics { public synchronized Snapshot getSnapshot() { return new SnapshotImpl(totalAggregation); } FixedSizeSlidingWindowMetrics(int windowSize); }
FixedSizeSlidingWindowMetrics implements Metrics { public synchronized Snapshot getSnapshot() { return new SnapshotImpl(totalAggregation); } FixedSizeSlidingWindowMetrics(int windowSize); @Override synchronized Snapshot record(long duration, TimeUnit durationUnit, Outcome outcome); synchronized Snapshot getSnapshot(); }
FixedSizeSlidingWindowMetrics implements Metrics { public synchronized Snapshot getSnapshot() { return new SnapshotImpl(totalAggregation); } FixedSizeSlidingWindowMetrics(int windowSize); @Override synchronized Snapshot record(long duration, TimeUnit durationUnit, Outcome outcome); synchronized Snapshot getSnapshot();  }