fix(parser/diff): ns to ms conversion
All checks were successful
build / build (push) Successful in 1m9s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-10-13 06:11:38 -04:00
parent 10798a8c4b
commit 5084b659f6
GPG Key ID: D47306D7062CDA9D

View File

@ -36,14 +36,14 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
comment += fmt.Sprintf("Error: `%s`\n", result.Error) comment += fmt.Sprintf("Error: `%s`\n", result.Error)
} }
if conf.ShowTime { if conf.ShowTime {
comment += fmt.Sprintf("Time: `%d ms`\n", result.Time/1e9) comment += fmt.Sprintf("Time: `%d ms`\n", result.Time/1e6)
} }
if conf.ShowMemory { if conf.ShowMemory {
comment += fmt.Sprintf("Memory: `%.2f MiB`\n", comment += fmt.Sprintf("Memory: `%.2f MiB`\n",
float64(result.Memory)/(1024*1024)) float64(result.Memory)/(1024*1024))
} }
if conf.ShowRunTime { if conf.ShowRunTime {
comment += fmt.Sprintf("RunTime: `%d ms`\n", result.RunTime/1e9) comment += fmt.Sprintf("RunTime: `%d ms`\n", result.RunTime/1e6)
} }
for _, file := range conf.ShowFiles { for _, file := range conf.ShowFiles {
content, ok := result.Files[file] content, ok := result.Files[file]