prometheusmetricshost-metricsmachine-metricsnode-metricsprocfsprometheus-exportersystem-informationsystem-metrics
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
388 B
23 lines
388 B
package collector |
|
|
|
import ( |
|
"os" |
|
"testing" |
|
) |
|
|
|
func TestInterrupts(t *testing.T) { |
|
file, err := os.Open("fixtures/interrupts") |
|
if err != nil { |
|
t.Fatal(err) |
|
} |
|
defer file.Close() |
|
|
|
interrupts, err := parseInterrupts(file) |
|
if err != nil { |
|
t.Fatal(err) |
|
} |
|
|
|
if want, got := "5031", interrupts["NMI"].values[1]; want != got { |
|
t.Errorf("want interrupts %s, got %s", want, got) |
|
} |
|
}
|
|
|