use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class FileMetricSetTest method freeSpace.
@Test
public void freeSpace() {
File file = new File(System.getProperty("user.home"));
LongGauge freeSpaceGauge = metricsRegistry.newLongGauge("file.partition[user.home].freeSpace");
assertAlmostEquals(file.getFreeSpace(), freeSpaceGauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class FileMetricSetTest method usableSpace.
@Test
public void usableSpace() {
File file = new File(System.getProperty("user.home"));
LongGauge usableSpaceGauge = metricsRegistry.newLongGauge("file.partition[user.home].usableSpace");
assertAlmostEquals(file.getUsableSpace(), usableSpaceGauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class FileMetricSetTest method totalSpace.
@Test
public void totalSpace() {
File file = new File(System.getProperty("user.home"));
LongGauge totalSpaceGauge = metricsRegistry.newLongGauge("file.partition[user.home].totalSpace");
assertAlmostEquals(file.getTotalSpace(), totalSpaceGauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method minorCount.
@Test
public void minorCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("gc.minorCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
gcStats.run();
assertEquals(gcStats.minorCount, gauge.read(), 1);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method unknownCount.
@Test
public void unknownCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("gc.unknownCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
gcStats.run();
assertEquals(gcStats.unknownCount, gauge.read(), 1);
}
});
}
Aggregations