Skip to content

Commit

Permalink
Converting CPUUsage.TotalUsage to percentage for Windows during colle…
Browse files Browse the repository at this point in the history
…ction.
  • Loading branch information
bboerst committed Jan 29, 2018
1 parent 74bbcac commit b402122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion agent/stats/utils_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func dockerStatsToContainerStats(dockerStats *docker.Stats) (*ContainerStats, er
return nil, fmt.Errorf("invalid number of cpu cores acquired from the system")
}

cpuUsage := dockerStats.CPUStats.CPUUsage.TotalUsage / numCores
cpuUsage := (dockerStats.CPUStats.CPUUsage.TotalUsage * 100) / numCores
memoryUsage := dockerStats.MemoryStats.PrivateWorkingSet
return &ContainerStats{
cpuUsage: cpuUsage,
Expand Down

0 comments on commit b402122

Please sign in to comment.