Restore field name case in interrupts input (#5850)
This commit is contained in:
parent
74948edf23
commit
2d44a88b19
|
@ -102,7 +102,7 @@ func gatherTagsFields(irq IRQ) (map[string]string, map[string]interface{}) {
|
||||||
tags := map[string]string{"irq": irq.ID, "type": irq.Type, "device": irq.Device}
|
tags := map[string]string{"irq": irq.ID, "type": irq.Type, "device": irq.Device}
|
||||||
fields := map[string]interface{}{"total": irq.Total}
|
fields := map[string]interface{}{"total": irq.Total}
|
||||||
for i := 0; i < len(irq.Cpus); i++ {
|
for i := 0; i < len(irq.Cpus); i++ {
|
||||||
cpu := fmt.Sprintf("cpu%d", i)
|
cpu := fmt.Sprintf("CPU%d", i)
|
||||||
fields[cpu] = irq.Cpus[i]
|
fields[cpu] = irq.Cpus[i]
|
||||||
}
|
}
|
||||||
return tags, fields
|
return tags, fields
|
||||||
|
|
|
@ -23,7 +23,7 @@ func expectCpuAsFields(m *testutil.Accumulator, t *testing.T, measurement string
|
||||||
fields := map[string]interface{}{}
|
fields := map[string]interface{}{}
|
||||||
total := int64(0)
|
total := int64(0)
|
||||||
for idx, count := range irq.Cpus {
|
for idx, count := range irq.Cpus {
|
||||||
fields[fmt.Sprintf("cpu%d", idx)] = count
|
fields[fmt.Sprintf("CPU%d", idx)] = count
|
||||||
total += count
|
total += count
|
||||||
}
|
}
|
||||||
fields["total"] = total
|
fields["total"] = total
|
||||||
|
|
Loading…
Reference in New Issue