add cpu and mem support to bench

This commit is contained in:
Dustin Stiles 2025-03-10 10:51:22 -04:00
parent b9c105a539
commit 8bfa72fb58
Signed by: duwstiles
GPG Key ID: BCD9912EC231FC87
2 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,6 @@ goos: linux
goarch: amd64
pkg: koti.casa/numenor-labs/dsfx/pkg/handshake
cpu: Intel(R) Core(TM) Ultra 9 185H
BenchmarkHandshake-22 4095 292021 ns/op
BenchmarkHandshake 4214 274337 ns/op 12976 B/op 131 allocs/op
PASS
ok koti.casa/numenor-labs/dsfx/pkg/handshake 1.203s
ok koti.casa/numenor-labs/dsfx/pkg/handshake 1.163s

View File

@ -7,7 +7,7 @@ import (
)
func main() {
cmd := exec.Command("go", "test", "-bench=Handshake", "./pkg/handshake/...")
cmd := exec.Command("go", "test", "-bench=Handshake", "-cpu=1", "-benchmem", "./pkg/handshake/...")
output, err := cmd.Output()
if err != nil {