From 1cd5c352282cad2000df404d1f1eca5b56727c79 Mon Sep 17 00:00:00 2001 From: sanaz Date: Wed, 11 Sep 2024 14:09:39 -0700 Subject: [PATCH 1/3] uses the latest version of the main for benchmark tests --- test/e2e/benchmark/throughput.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/benchmark/throughput.go b/test/e2e/benchmark/throughput.go index b0392468ce..392a59c7e0 100644 --- a/test/e2e/benchmark/throughput.go +++ b/test/e2e/benchmark/throughput.go @@ -136,10 +136,14 @@ func TwoNodeBigBlock8MB(logger *log.Logger) error { } func TwoNodeBigBlock8MBLatency(logger *log.Logger) error { + latestVersion, err := testnet.GetLatestVersion() + testnet.NoError("failed to get latest version", err) manifest := bigBlockManifest manifest.MaxBlockBytes = 8 * testnet.MB manifest.EnableLatency = true manifest.LatencyParams = LatencyParams{70, 0} + manifest.CelestiaAppVersion = latestVersion + manifest.TxClientVersion = testnet.TxsimVersion return runBenchmarkTest(logger, "TwoNodeBigBlock8MBLatency", manifest) } From e6598ee260dc65d834f91c102c8aae12f1475b9d Mon Sep 17 00:00:00 2001 From: sanaz Date: Wed, 11 Sep 2024 15:03:44 -0700 Subject: [PATCH 2/3] refactors benchmark tests --- test/e2e/benchmark/throughput.go | 132 ++++++++++++------------------- 1 file changed, 51 insertions(+), 81 deletions(-) diff --git a/test/e2e/benchmark/throughput.go b/test/e2e/benchmark/throughput.go index 392a59c7e0..5af7284d41 100644 --- a/test/e2e/benchmark/throughput.go +++ b/test/e2e/benchmark/throughput.go @@ -12,46 +12,51 @@ const ( seed = 42 ) -var bigBlockManifest = Manifest{ - ChainID: "test", - Validators: 2, - TxClients: 2, - ValidatorResource: testnet.Resources{ - MemoryRequest: "12Gi", - MemoryLimit: "12Gi", - CPU: "8", - Volume: "20Gi", - }, - TxClientsResource: testnet.Resources{ - MemoryRequest: "1Gi", - MemoryLimit: "3Gi", - CPU: "2", - Volume: "1Gi", - }, - SelfDelegation: 10000000, - // @TODO Update the CelestiaAppVersion and TxClientVersion to the latest - // version of the main branch once the PR#3261 is merged by addressing this - // issue https://github.com/celestiaorg/celestia-app/issues/3603. - CelestiaAppVersion: "pr-3261", - TxClientVersion: "pr-3261", - EnableLatency: false, - LatencyParams: LatencyParams{70, 0}, // in milliseconds - BlobSequences: 60, - BlobsPerSeq: 6, - BlobSizes: "200000", - PerPeerBandwidth: 5 * testnet.MB, - UpgradeHeight: 0, - TimeoutCommit: 11 * time.Second, - TimeoutPropose: 80 * time.Second, - Mempool: "v1", // ineffective as it always defaults to v1 - BroadcastTxs: true, - Prometheus: false, - GovMaxSquareSize: 512, - MaxBlockBytes: 7800000, - TestDuration: 5 * time.Minute, - LocalTracingType: "local", - PushTrace: true, - DisableBBR: true, +func getBigBlockManifest() (Manifest, error) { + latestVersion, err := testnet.GetLatestVersion() + if err != nil { + return Manifest{}, err + } + bigBlockManifest := Manifest{ + ChainID: "test", + Validators: 2, + TxClients: 2, + ValidatorResource: testnet.Resources{ + MemoryRequest: "12Gi", + MemoryLimit: "12Gi", + CPU: "8", + Volume: "20Gi", + }, + TxClientsResource: testnet.Resources{ + MemoryRequest: "1Gi", + MemoryLimit: "3Gi", + CPU: "2", + Volume: "1Gi", + }, + SelfDelegation: 10000000, + CelestiaAppVersion: latestVersion, + TxClientVersion: latestVersion, + EnableLatency: false, + LatencyParams: LatencyParams{70, 0}, // in milliseconds + BlobSequences: 60, + BlobsPerSeq: 6, + BlobSizes: "200000", + PerPeerBandwidth: 5 * testnet.MB, + UpgradeHeight: 0, + TimeoutCommit: 11 * time.Second, + TimeoutPropose: 80 * time.Second, + Mempool: "v1", // ineffective as it always defaults to v1 + BroadcastTxs: true, + Prometheus: false, + GovMaxSquareSize: 512, + MaxBlockBytes: 8 * testnet.MB, + TestDuration: 5 * time.Minute, + LocalTracingType: "local", + PushTrace: true, + DisableBBR: true, + } + + return bigBlockManifest, nil } func TwoNodeSimple(logger *log.Logger) error { @@ -130,58 +135,23 @@ func runBenchmarkTest(logger *log.Logger, testName string, manifest Manifest) er } func TwoNodeBigBlock8MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 8 * testnet.MB + manifest, err := getBigBlockManifest() + testnet.NoError("failed to get manifest", err) return runBenchmarkTest(logger, "TwoNodeBigBlock8MB", manifest) } func TwoNodeBigBlock8MBLatency(logger *log.Logger) error { - latestVersion, err := testnet.GetLatestVersion() - testnet.NoError("failed to get latest version", err) - manifest := bigBlockManifest - manifest.MaxBlockBytes = 8 * testnet.MB + manifest, err := getBigBlockManifest() + testnet.NoError("failed to get manifest", err) manifest.EnableLatency = true - manifest.LatencyParams = LatencyParams{70, 0} - manifest.CelestiaAppVersion = latestVersion - manifest.TxClientVersion = testnet.TxsimVersion return runBenchmarkTest(logger, "TwoNodeBigBlock8MBLatency", manifest) } -func TwoNodeBigBlock32MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 32 * testnet.MB - return runBenchmarkTest(logger, "TwoNodeBigBlock32MB", manifest) -} - -func TwoNodeBigBlock64MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 64 * testnet.MB - return runBenchmarkTest(logger, "TwoNodeBigBlock64MB", manifest) -} - func LargeNetworkBigBlock8MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 8 * testnet.MB + manifest, err := getBigBlockManifest() + testnet.NoError("failed to get manifest", err) manifest.Validators = 50 manifest.TxClients = 50 manifest.BlobSequences = 2 return runBenchmarkTest(logger, "LargeNetworkBigBlock8MB", manifest) } - -func LargeNetworkBigBlock32MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 32 * testnet.MB - manifest.Validators = 50 - manifest.TxClients = 50 - manifest.BlobSequences = 2 - return runBenchmarkTest(logger, "LargeNetworkBigBlock32MB", manifest) -} - -func LargeNetworkBigBlock64MB(logger *log.Logger) error { - manifest := bigBlockManifest - manifest.MaxBlockBytes = 64 * testnet.MB - manifest.Validators = 50 - manifest.TxClients = 50 - manifest.BlobSequences = 2 - return runBenchmarkTest(logger, "LargeNetworkBigBlock64MB", manifest) -} From b9a138d2dcc9e6348248b076c843a9978e4aad61 Mon Sep 17 00:00:00 2001 From: sanaz Date: Wed, 11 Sep 2024 15:04:00 -0700 Subject: [PATCH 3/3] removes deleted tests from available tests --- test/e2e/benchmark/main.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/e2e/benchmark/main.go b/test/e2e/benchmark/main.go index be4eb1e126..395606bb1a 100644 --- a/test/e2e/benchmark/main.go +++ b/test/e2e/benchmark/main.go @@ -12,12 +12,8 @@ func main() { tests := []Test{ {"TwoNodeSimple", TwoNodeSimple}, {"TwoNodeBigBlock8MB", TwoNodeBigBlock8MB}, - {"TwoNodeBigBlock32MB", TwoNodeBigBlock32MB}, {"TwoNodeBigBlock8MBLatency", TwoNodeBigBlock8MBLatency}, - {"TwoNodeBigBlock64MB", TwoNodeBigBlock64MB}, {"LargeNetworkBigBlock8MB", LargeNetworkBigBlock8MB}, - {"LargeNetworkBigBlock32MB", LargeNetworkBigBlock32MB}, - {"LargeNetworkBigBlock64MB", LargeNetworkBigBlock64MB}, } // check the test name passed as an argument and run it