SystemMetricsCollectorTest
Tests
| Test |
Duration |
Result |
| CPU load is computed from /proc/stat deltas, so the first sample has no CPU metric yet |
0.045s |
passed |
| RAM comes from MemTotal and MemAvailable in GiB |
0.002s |
passed |
| a corrupt state file starts a fresh series instead of failing |
0.003s |
passed |
| a restart loads the persisted aggregation state and continues the series |
0.014s |
passed |
| disk and repository size are reported in GiB |
0.002s |
passed |
| min, max, and avg aggregate over all samples |
0.004s |
passed |
| the repository size probe is throttled to every 10th sample |
0.018s |
passed |
| the snapshot before the first sample is empty but well-formed |
0.001s |
passed |
| unreadable sources degrade to null metrics, never fail the sample |
0.003s |
passed |
Standard output
Creating nstance of class de.hoennig.werkator.metrics.SystemMetricsCollectorTest
2026-09-03T12:35:10.414Z WARN 146 --- [e-675520813#341] d.h.w.metrics.SystemMetricsCollector : ignoring unreadable metrics state file /tmp/werkator-metrics-test15564367489103500254/system-metrics-state.json; starting a fresh series: Unrecognized token 'not': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
2026-09-03T12:35:10.417Z WARN 146 --- [e-675520813#342] d.h.w.metrics.SystemMetricsCollector : cannot read cpu metrics; showing n/a: java.nio.file.NoSuchFileException: /tmp/werkator-metrics-test9823015464477964287/stat
2026-09-03T12:35:10.418Z WARN 146 --- [e-675520813#342] d.h.w.metrics.SystemMetricsCollector : cannot read ram metrics; showing n/a: java.nio.file.NoSuchFileException: /tmp/werkator-metrics-test9823015464477964287/meminfo
2026-09-03T12:35:10.418Z WARN 146 --- [e-675520813#342] d.h.w.metrics.SystemMetricsCollector : cannot read disk metrics; showing n/a: java.lang.IllegalStateException: no file store
2026-09-03T12:35:10.418Z WARN 146 --- [e-675520813#342] d.h.w.metrics.SystemMetricsCollector : cannot read repo size metrics; showing n/a: java.lang.IllegalStateException: walk failed