Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude IOWait time from the CPU total #7691

Merged
merged 2 commits into from
Jul 24, 2018

Conversation

tsg
Copy link
Contributor

@tsg tsg commented Jul 24, 2018

This affects the following two metrics:

  • system.cpu.total.pct
  • system.cpu.total.norm.pct

Fixes #7627.

This affects the following two metrics:

* `system.cpu.total.pct`
* `system.cpu.total.norm.pct`

Fixes elastic#7627.
@tsg tsg force-pushed the exclude_iowait_form_cpu_total branch from 12fb1bf to 7653ac5 Compare July 24, 2018 10:20
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFG

@@ -116,7 +116,8 @@ func cpuPercentages(s0, s1 *sigar.Cpu, numCPU int) Percentages {
}

calculateTotalPct := func() float64 {
return common.Round(float64(numCPU)-calculatePct(s0.Idle, s1.Idle), common.DefaultDecimalPlacesCount)
idle := calculatePct(s0.Idle, s1.Idle) + calculatePct(s0.Wait, s1.Wait)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a note to this line to explain why we calculate it like this? Can be later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment.

@ruflin ruflin merged commit dd5938e into elastic:master Jul 24, 2018
@andrewkroh
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants