diff options
Diffstat (limited to 'kamon-system-metrics/src/test')
-rw-r--r-- | kamon-system-metrics/src/test/scala/kamon/metrics/SystemMetricsSpec.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kamon-system-metrics/src/test/scala/kamon/metrics/SystemMetricsSpec.scala b/kamon-system-metrics/src/test/scala/kamon/metrics/SystemMetricsSpec.scala index 7af704d5..452ee0c7 100644 --- a/kamon-system-metrics/src/test/scala/kamon/metrics/SystemMetricsSpec.scala +++ b/kamon-system-metrics/src/test/scala/kamon/metrics/SystemMetricsSpec.scala @@ -74,6 +74,20 @@ class SystemMetricsSpec extends BaseKamonSpec("system-metrics-spec") with Redire memoryMetrics.gauge("non-heap-committed").get.numberOfMeasurements should be > 0L } + "record correctly updatable values for heap metrics" in { + Thread.sleep(3000) + + val data = new Array[Byte](20 * 1024 * 1024) // 20 Mb of data + + Thread.sleep(3000) + + val memoryMetrics = takeSnapshotOf("jmx-memory", "system-metric") + val heapUsed = memoryMetrics.gauge("heap-used").get + + heapUsed.max should be > heapUsed.min + data.size should be > 0 // Just for data usage + } + "record daemon, count and peak jvm threads metrics" in { val threadsMetrics = takeSnapshotOf("threads", "system-metric") |