提交 8895bec2 作者: Łukasz Magiera

ci: adjust benchmark units

License: MIT
Signed-off-by: 's avatarŁukasz Magiera <magik6k@gmail.com>
上级 ede11501
......@@ -194,9 +194,11 @@ ansiColor('xterm') { withEnv(['TERM=xterm-color']) {
},
'benchmark': {
setupStep('linux') { run ->
run 'make test/bench/bench-results.json'
timeout(time: sharness_timeout, unit: 'MINUTES') {
run 'make test/bench/bench-results.json'
benchmark altInputSchema: '', altInputSchemaLocation: '', inputLocation: 'test/bench/bench-results.json', schemaSelection: 'defaultSchema', truncateStrings: false
benchmark altInputSchema: '', altInputSchemaLocation: '', inputLocation: 'test/bench/bench-results.json', schemaSelection: 'defaultSchema', truncateStrings: false
}
}
},
)
......
......@@ -71,8 +71,8 @@ func mainErr() error {
results = append(results, Result{
Name: "time/op",
Description: "time per operation",
Unit: "ns",
DblValue: bench.NsPerOp,
Unit: "ms",
DblValue: bench.NsPerOp / 1e6,
})
}
......@@ -90,16 +90,16 @@ func mainErr() error {
Name: "allocs/op",
Description: "number of allocations per operation",
Unit: "",
DblValue: float64(bench.AllocsPerOp), //TODO: figure out a better way
DblValue: float64(bench.AllocsPerOp),
})
}
if bench.Measured&parse.AllocedBytesPerOp != 0 {
results = append(results, Result{
Name: "alloc B/op",
Name: "alloc mem/op",
Description: "bytes allocated per operation",
Unit: "B",
DblValue: float64(bench.AllocedBytesPerOp), //TODO: figure out a better way
Unit: "MB",
DblValue: float64(bench.AllocedBytesPerOp) / (1 << 20),
})
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论