use of io.dropwizard.metrics.UniformSnapshot in project light-4j by networknt.
the class UniformSnapshotTest method calculatesAStdDevOfZeroForASingletonSnapshot.
@Test
public void calculatesAStdDevOfZeroForASingletonSnapshot() throws Exception {
final Snapshot singleItemSnapshot = new UniformSnapshot(new long[] { 1 });
assertThat(singleItemSnapshot.getStdDev()).isZero();
}
use of io.dropwizard.metrics.UniformSnapshot 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.UniformSnapshot 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.UniformSnapshot 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.UniformSnapshot 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);
}
Aggregations