Skip to content

Commit

Permalink
Use mode consistently: replace cpumode in thread_cpu_seconds_total.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff committed Apr 13, 2019
1 parent 2825293 commit c3f6a04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/integration-tester/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ func verify(results map[string][]result) bool {
}

for _, result := range results["thread_cpu_seconds_total"] {
if result.labels["cpumode"] == "system" {
if result.labels["mode"] == "system" {
switch tname := result.labels["threadname"]; tname {
case "sysbusy", "blocking":
assertGreaterOrEqual("thread_cpu_seconds_total system "+tname, result.value, 0.00001)
default:
assertGreaterOrEqual("thread_cpu_seconds_total system "+tname, result.value, 0)
}
} else if result.labels["cpumode"] == "user" {
} else if result.labels["mode"] == "user" {
switch tname := result.labels["threadname"]; tname {
case "userbusy":
assertGreaterOrEqual("thread_cpu_seconds_total user "+tname, result.value, 0.00001)
Expand Down
2 changes: 1 addition & 1 deletion cmd/process-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var (
threadCpuSecsDesc = prometheus.NewDesc(
"namedprocess_namegroup_thread_cpu_seconds_total",
"Cpu user/system usage in seconds",
[]string{"groupname", "threadname", "cpumode"},
[]string{"groupname", "threadname", "mode"},
nil)

threadIoBytesDesc = prometheus.NewDesc(
Expand Down

0 comments on commit c3f6a04

Please # to comment.