use of io.dropwizard.metrics.Snapshot in project light-4j by networknt.
the class UniformSnapshotTest method calculatesAMeanOfZeroForAnEmptySnapshot.
@Test
public void calculatesAMeanOfZeroForAnEmptySnapshot() throws Exception {
final Snapshot emptySnapshot = new UniformSnapshot(new long[] {});
assertThat(emptySnapshot.getMean()).isZero();
}
use of io.dropwizard.metrics.Snapshot in project light-4j by networknt.
the class UniformSnapshotTest method calculatesAMinOfZeroForAnEmptySnapshot.
@Test
public void calculatesAMinOfZeroForAnEmptySnapshot() throws Exception {
final Snapshot emptySnapshot = new UniformSnapshot(new long[] {});
assertThat(emptySnapshot.getMin()).isZero();
}
use of io.dropwizard.metrics.Snapshot in project light-4j by networknt.
the class UniformSnapshotTest method calculatesAStdDevOfZeroForAnEmptySnapshot.
@Test
public void calculatesAStdDevOfZeroForAnEmptySnapshot() throws Exception {
final Snapshot emptySnapshot = new UniformSnapshot(new long[] {});
assertThat(emptySnapshot.getStdDev()).isZero();
}
use of io.dropwizard.metrics.Snapshot in project light-4j by networknt.
the class UniformSnapshotTest method canAlsoBeCreatedFromACollectionOfLongs.
@Test
public void canAlsoBeCreatedFromACollectionOfLongs() throws Exception {
final Snapshot other = new UniformSnapshot(asList(5L, 1L, 2L, 3L, 4L));
assertThat(other.getValues()).containsOnly(1, 2, 3, 4, 5);
}
use of io.dropwizard.metrics.Snapshot in project light-4j by networknt.
the class UniformSnapshotTest method calculatesAMaxOfZeroForAnEmptySnapshot.
@Test
public void calculatesAMaxOfZeroForAnEmptySnapshot() throws Exception {
final Snapshot emptySnapshot = new UniformSnapshot(new long[] {});
assertThat(emptySnapshot.getMax()).isZero();
}
Aggregations