Used integer division in the profiler average column to make it easier to sort.
This commit is contained in:
parent
cb8a4872d5
commit
721acd44a4
|
@ -122,9 +122,9 @@ func main() {
|
||||||
for f, p := range profile {
|
for f, p := range profile {
|
||||||
fmt.Printf("%s %v %v ", f, p.Calls, p.TotalTime)
|
fmt.Printf("%s %v %v ", f, p.Calls, p.TotalTime)
|
||||||
if p.Calls != 0 {
|
if p.Calls != 0 {
|
||||||
fmt.Printf("%v", float64(p.TotalTime) / float64(p.Calls))
|
fmt.Printf("%v", p.TotalTime / uint64(p.Calls))
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("%v", float64(0))
|
fmt.Printf("%v", 0)
|
||||||
}
|
}
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue