This commit is contained in:
jarek committed 2026-07-25 08:41:01 +02:00
1 parent 9f09d60a83
commit 64b6dcd744
177 files changed
+21182 -1042

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/Finsys/dockhand/collector
go 1.25.11
go 1.25.12
+8
View File
@@ -552,6 +552,14 @@ func (m *manager) collectMetrics(env *environment) {
}
normalizedCPU := totalCPU / float64(cpuCount)
// Host-normalized CPU can never legitimately exceed 100% of total host
// capacity. Values >100 are a transient artifact — a freshly started
// container's first stats sample has precpu_stats≈0, so cpuDelta is its
// whole lifetime usage, producing a garbage spike. Clamp so the artifact
// never enters history and blows out the dashboard chart (#1279).
if normalizedCPU > 100 {
normalizedCPU = 100
}
var memPct float64
if memTotal > 0 {
memPct = (float64(totalMem) / float64(memTotal)) * 100