Fixing flops_any metric in LikwidCollector

This commit is contained in:
Thomas Roehl 2021-03-27 13:50:25 +01:00
parent bc5d4b288e
commit 162f0f14d6

View File

@ -139,7 +139,7 @@ func (m *LikwidCollector) Read(interval time.Duration) {
for cpu := range m.cpus { for cpu := range m.cpus {
if flops_dp, found := m.cpus[cpu]["flops_dp"]; found { if flops_dp, found := m.cpus[cpu]["flops_dp"]; found {
if flops_sp, found := m.cpus[cpu]["flops_sp"]; found { if flops_sp, found := m.cpus[cpu]["flops_sp"]; found {
m.cpus[cpu]["flops_any"] = flops_dp.(float64) + flops_sp.(float64) m.cpus[cpu]["flops_any"] = (2 * flops_dp.(float64)) + flops_sp.(float64)
} }
} }
} }