Skip to content

Commit

Permalink
for benchmark set buffer interval to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
pascal-fischer committed Jan 23, 2025
1 parent 4755d83 commit fce2537
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions management/server/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3005,6 +3005,8 @@ func peerShouldReceiveUpdate(t *testing.T, updateMessage <-chan *UpdateMessage)
}

func BenchmarkSyncAndMarkPeer(b *testing.B) {
os.Setenv("NB_GET_ACCOUNT_BUFFER_INTERVAL", "0")

Check failure on line 3008 in management/server/account_test.go

View workflow job for this annotation

GitHub Actions / lint (macos-latest)

os.Setenv() can be replaced by `b.Setenv()` in BenchmarkSyncAndMarkPeer (tenv)

Check failure on line 3008 in management/server/account_test.go

View workflow job for this annotation

GitHub Actions / lint (windows-latest)

os.Setenv() can be replaced by `b.Setenv()` in BenchmarkSyncAndMarkPeer (tenv)

Check failure on line 3008 in management/server/account_test.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

os.Setenv() can be replaced by `b.Setenv()` in BenchmarkSyncAndMarkPeer (tenv)

benchCases := []struct {
name string
peers int
Expand All @@ -3015,10 +3017,10 @@ func BenchmarkSyncAndMarkPeer(b *testing.B) {
minMsPerOpCICD float64
maxMsPerOpCICD float64
}{
{"Small", 50, 5, 1, 3, 3, 19},
{"Medium", 500, 100, 7, 13, 10, 90},
{"Large", 5000, 200, 65, 80, 60, 240},
{"Small single", 50, 10, 1, 3, 3, 80},
{"Small", 50, 5, 1, 5, 3, 19},
{"Medium", 500, 100, 7, 22, 10, 90},
{"Large", 5000, 200, 65, 110, 60, 240},
{"Small single", 50, 10, 1, 4, 3, 80},
{"Medium single", 500, 10, 7, 13, 10, 37},
{"Large 5", 5000, 15, 65, 80, 60, 220},
}
Expand Down

0 comments on commit fce2537

Please sign in to comment.