diff options
author | Ben Kochie <superq@gmail.com> | 2017-11-02 09:59:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 09:59:46 +0100 |
commit | ea250d73f4ee10c9279635aa4fdc5e263667881a (patch) | |
tree | 34dfb4c4c0577e8a221d59679aa99fc9496e13c2 /collector/interrupts_linux_test.go | |
parent | f6556e69eca9860cdc7890a7d23fa542e0762eac (diff) | |
download | prometheus_node_collector-ea250d73f4ee10c9279635aa4fdc5e263667881a.tar.bz2 prometheus_node_collector-ea250d73f4ee10c9279635aa4fdc5e263667881a.tar.xz prometheus_node_collector-ea250d73f4ee10c9279635aa4fdc5e263667881a.zip |
Fix off by one in Linux interrupts collector (#721)
* Fix off by one in Linux interrupts collector
* Fix off by one in CPU column handler.
* Add test.
* Enable interrupts in end-to-end test.
Diffstat (limited to 'collector/interrupts_linux_test.go')
-rw-r--r-- | collector/interrupts_linux_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/collector/interrupts_linux_test.go b/collector/interrupts_linux_test.go index f076fe8..02acb89 100644 --- a/collector/interrupts_linux_test.go +++ b/collector/interrupts_linux_test.go | |||
@@ -33,4 +33,8 @@ func TestInterrupts(t *testing.T) { | |||
33 | if want, got := "5031", interrupts["NMI"].values[1]; want != got { | 33 | if want, got := "5031", interrupts["NMI"].values[1]; want != got { |
34 | t.Errorf("want interrupts %s, got %s", want, got) | 34 | t.Errorf("want interrupts %s, got %s", want, got) |
35 | } | 35 | } |
36 | |||
37 | if want, got := "4968", interrupts["NMI"].values[3]; want != got { | ||
38 | t.Errorf("want interrupts %s, got %s", want, got) | ||
39 | } | ||
36 | } | 40 | } |