Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatskaari committed Nov 26, 2023
1 parent 849bce5 commit 0bcd651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/graph_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func createTargets(n int) []*BuildTarget {
targets := make([]*BuildTarget, n)
seen := map[BuildLabel]bool{}

rand.Seed(42) // Make sure it does the same thing every time.
rand.New(rand.NewSource(42)) // Make sure it does the same thing every time.

components := []string{
"src", "main", "cmd", "tools", "utils", "common", "query", "process", "update",
Expand Down
5 changes: 4 additions & 1 deletion src/core/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,8 @@ func getCPUTimes() (float64, float64) {
return 0.0, 0.0
}
t := ts[0]
return t.Total() - t.Idle - t.Iowait, t.Iowait

total := t.User + t.System + t.Idle + t.Nice + t.Iowait + t.Irq +
t.Softirq + t.Steal + t.Guest + t.GuestNice
return total - t.Idle - t.Iowait, t.Iowait
}

0 comments on commit 0bcd651

Please sign in to comment.