Restore field name case in interrupts input (#5850)

This commit is contained in:
Greg 2019-05-14 12:56:19 -06:00 committed by Daniel Nelson
parent 74948edf23
commit 2d44a88b19
2 changed files with 2 additions and 2 deletions

View File

@ -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}
fields := map[string]interface{}{"total": irq.Total}
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]
}
return tags, fields

View File

@ -23,7 +23,7 @@ func expectCpuAsFields(m *testutil.Accumulator, t *testing.T, measurement string
fields := map[string]interface{}{}
total := int64(0)
for idx, count := range irq.Cpus {
fields[fmt.Sprintf("cpu%d", idx)] = count
fields[fmt.Sprintf("CPU%d", idx)] = count
total += count
}
fields["total"] = total