1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:24:32 -06:00

cmd/trace: fix typos as reported by 'misspell'

This commit is contained in:
Leon Klingele 2019-02-22 16:53:32 +01:00
parent d3b8330b3d
commit b032c14394
No known key found for this signature in database
GPG Key ID: 0C8AF48831EEC211
2 changed files with 8 additions and 8 deletions

View File

@ -1159,17 +1159,17 @@ var templUserRegionType = template.Must(template.New("").Funcs(template.FuncMap{
d := time.Duration(nsec) * time.Nanosecond
return template.HTML(niceDuration(d))
},
"percent": func(dividened, divisor int64) template.HTML {
"percent": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return ""
}
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividend)/float64(divisor)*100))
},
"barLen": func(dividened, divisor int64) template.HTML {
"barLen": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return "0"
}
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividend)/float64(divisor)*100))
},
"unknownTime": func(desc regionDesc) int64 {
sum := desc.ExecTime + desc.IOTime + desc.BlockTime + desc.SyscallTime + desc.SchedWaitTime

View File

@ -166,17 +166,17 @@ var templGoroutine = template.Must(template.New("").Funcs(template.FuncMap{
d := time.Duration(nsec) * time.Nanosecond
return template.HTML(niceDuration(d))
},
"percent": func(dividened, divisor int64) template.HTML {
"percent": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return ""
}
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("(%.1f%%)", float64(dividend)/float64(divisor)*100))
},
"barLen": func(dividened, divisor int64) template.HTML {
"barLen": func(dividend, divisor int64) template.HTML {
if divisor == 0 {
return "0"
}
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividened)/float64(divisor)*100))
return template.HTML(fmt.Sprintf("%.2f%%", float64(dividend)/float64(divisor)*100))
},
"unknownTime": func(desc *trace.GDesc) int64 {
sum := desc.ExecTime + desc.IOTime + desc.BlockTime + desc.SyscallTime + desc.SchedWaitTime