Skip to content

Commit

Permalink
add bench just for seeding serv
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjit-bhat committed Feb 10, 2025
1 parent e38629b commit 68cae65
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions kt/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package kt

import (
"bytes"
"github.com/mit-pdos/pav/benchutil"
_ "github.com/mit-pdos/pav/benchutil"
"github.com/mit-pdos/pav/cryptoffi"
"math/rand/v2"
"testing"
Expand All @@ -12,9 +12,17 @@ import (
var defVal = []byte{2}

const (
nSeed int = 1_000_000
defNSeed int = 1_000_000
)

func TestBenchSeed(t *testing.T) {
start := time.Now()
seedServer(20_000)
total := time.Since(start)
t.Log(total)
}

/*
func TestBenchPut(t *testing.T) {
serv, rnd, vrfPk := seedServer()
nOps := 2_000
Expand All @@ -40,8 +48,9 @@ func TestBenchPut(t *testing.T) {
{N: m1, Unit: "total ms"},
})
}
*/

func seedServer() (*Server, *rand.ChaCha8, *cryptoffi.VrfPublicKey) {
func seedServer(nSeed int) (*Server, *rand.ChaCha8, *cryptoffi.VrfPublicKey) {
serv, _, vrfPk := NewServer()
var seed [32]byte
rnd := rand.NewChaCha8(seed)
Expand Down

0 comments on commit 68cae65

Please sign in to comment.