Skip to content

Commit

Permalink
Fix hound
Browse files Browse the repository at this point in the history
Signed-off-by: chrismark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Sep 18, 2019
1 parent 9213aea commit a106b3f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4974,7 +4974,7 @@ format: percent
--
*`docker.cpu.total.normal.pct`*::
*`docker.cpu.total.norm.pct`*::
+
--
Total CPU usage normalized by the number of CPU cores.
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/docker/cpu/_meta/fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
format: percent
description: >
Total CPU usage.
- name: total.normal.pct
- name: total.norm.pct
type: scaled_float
format: percent
description: >
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/docker/cpu/cpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestCPUService_PerCpuUsage(t *testing.T) {
s.(common.MapStr).Delete("ticks")
}
if !equalEvent(tt.expected, out) {
t.Errorf("PerCpuUsage(%v) => %v, want %v", tt.given.CPUStats.CPUUsage.PercpuUsage, out, tt.expected)
t.Errorf("PerCPUUsage(%v) => %v, want %v", tt.given.CPUStats.CPUUsage.PercpuUsage, out, tt.expected)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/docker/cpu/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func eventsMapping(r mb.ReporterV2, cpuStatsList []CPUStats) {

func eventMapping(r mb.ReporterV2, stats *CPUStats) {
fields := common.MapStr{
"core": stats.PerCpuUsage,
"core": stats.PerCPUUsage,
"total": common.MapStr{
"pct": stats.TotalUsage,
"norm": common.MapStr{
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/module/docker/cpu/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
type CPUStats struct {
Time common.Time
Container *docker.Container
PerCpuUsage common.MapStr
PerCPUUsage common.MapStr
TotalUsage float64
TotalUsageNormalized float64
UsageInKernelmode uint64
Expand Down Expand Up @@ -81,7 +81,7 @@ func (c *CPUService) getCPUStats(myRawStat *docker.Stat, dedot bool) CPUStats {
}

if c.Cores {
stats.PerCpuUsage = usage.PerCPU()
stats.PerCPUUsage = usage.PerCPU()
}

return stats
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/docker/fields.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a106b3f

Please sign in to comment.