mirror of
https://git.numenor-labs.us/dsfx.git
synced 2025-04-29 08:10:34 +00:00
add bench tool
This commit is contained in:
parent
2d3631af45
commit
d75d432818
@ -1,7 +1,7 @@
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: koti.casa/numenor-labs/dsfx/shared/dnet
|
||||
pkg: koti.casa/numenor-labs/dsfx/pkg/handshake
|
||||
cpu: Intel(R) Core(TM) Ultra 9 185H
|
||||
BenchmarkHandshake-22 537 2179739 ns/op
|
||||
BenchmarkHandshake-22 530 2233341 ns/op
|
||||
PASS
|
||||
ok koti.casa/numenor-labs/dsfx/shared/dnet 1.182s
|
||||
ok koti.casa/numenor-labs/dsfx/pkg/handshake 1.192s
|
||||
|
18
tool/bench/main.go
Normal file
18
tool/bench/main.go
Normal file
@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func main() {
|
||||
cmd := exec.Command("go", "test", "-bench=Handshake", "./pkg/handshake/...")
|
||||
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
fmt.Fprint(os.Stdout, string(output))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user