Skip to content

Commit

Permalink
set benchmark env
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 23, 2025
1 parent 113af47 commit ebfb3cf
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions management/server/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3074,6 +3074,7 @@ func BenchmarkSyncAndMarkPeer(b *testing.B) {
}

func BenchmarkLoginPeer_ExistingPeer(b *testing.B) {
b.Setenv("NB_GET_ACCOUNT_BUFFER_INTERVAL", "0")
benchCases := []struct {
name string
peers int
Expand All @@ -3084,12 +3085,12 @@ func BenchmarkLoginPeer_ExistingPeer(b *testing.B) {
minMsPerOpCICD float64
maxMsPerOpCICD float64
}{
{"Small", 50, 5, 102, 110, 3, 20},
{"Medium", 500, 100, 105, 140, 20, 110},
{"Large", 5000, 200, 160, 200, 120, 260},
{"Small single", 50, 10, 102, 110, 5, 40},
{"Medium single", 500, 10, 105, 140, 10, 60},
{"Large 5", 5000, 15, 160, 200, 60, 180},
{"Small", 50, 5, 2, 10, 3, 20},
{"Medium", 500, 100, 5, 40, 20, 110},
{"Large", 5000, 200, 60, 100, 120, 260},
{"Small single", 50, 10, 2, 10, 5, 40},
{"Medium single", 500, 10, 5, 40, 10, 60},
{"Large 5", 5000, 15, 60, 100, 60, 180},
}

log.SetOutput(io.Discard)
Expand Down Expand Up @@ -3148,6 +3149,7 @@ func BenchmarkLoginPeer_ExistingPeer(b *testing.B) {
}

func BenchmarkLoginPeer_NewPeer(b *testing.B) {
b.Setenv("NB_GET_ACCOUNT_BUFFER_INTERVAL", "0")
benchCases := []struct {
name string
peers int
Expand All @@ -3158,12 +3160,12 @@ func BenchmarkLoginPeer_NewPeer(b *testing.B) {
minMsPerOpCICD float64
maxMsPerOpCICD float64
}{
{"Small", 50, 5, 107, 120, 10, 80},
{"Medium", 500, 100, 105, 140, 30, 140},
{"Large", 5000, 200, 180, 220, 140, 300},
{"Small single", 50, 10, 107, 120, 10, 80},
{"Medium single", 500, 10, 105, 140, 20, 60},
{"Large 5", 5000, 15, 180, 220, 80, 200},
{"Small", 50, 5, 7, 20, 10, 80},
{"Medium", 500, 100, 5, 40, 30, 140},
{"Large", 5000, 200, 80, 120, 140, 300},
{"Small single", 50, 10, 7, 20, 10, 80},
{"Medium single", 500, 10, 5, 40, 20, 60},
{"Large 5", 5000, 15, 80, 120, 80, 200},
}

log.SetOutput(io.Discard)
Expand Down

0 comments on commit ebfb3cf

Please sign in to comment.