Conversation
emit full benchmark run metadata (config, tags, metrics, block range, spamoor stats) as JSON when BENCH_RESULT_OUTPUT is set. consumed by external matrix runner for table generation.
- Deduplicate overhead/reth-rate computation: move stats-based helpers to helpers.go, make span-based wrappers delegate to them - Fix sub-millisecond precision loss in engine span timings by using microsecond-based float division instead of integer truncation - Add spamoor stats to TestGasBurner for consistency with other tests
- Add MaxPending, Rebroadcast, BaseFee, TipFee to benchConfig - Fix ERC20 test hardcoding max_wallets=200 instead of using cfg - Replace all hardcoded spamoor params with cfg fields across tests
- Add resourceAttrs struct with host, OS, and service fields - Extract attributes from VictoriaTraces LogsQL span data via resourceAttrCollector interface - Include host metadata in structured benchmark result JSON
Move emitRunResult into a deferred closure in all three test functions. If the test fails after metrics are collected, the structured JSON is still written. If it fails before result data exists, the defer is a no-op.
Remove the 3-second sleep before requireSpammersRunning that caused all transactions to be mined before the measurement window started, leaving SteadyState at 0s. Also add deferred emitRunResult, configurable spamoor params, and spamoorStats collection to match the other benchmark tests.
… mode In external mode the sequencer reports spans as "ev-node" (not the test-specific name like "ev-node-erc20"), so trace queries returned zero spans. Store service names on env: local mode uses the test-specific name, external mode defaults to "ev-node"/"ev-reth" with BENCH_EVNODE_SERVICE_NAME/BENCH_EVRETH_SERVICE_NAME overrides.
fetchResourceAttrs only needs one span but was streaming the full result set from VictoriaTraces. Add limit=1 to the LogsQL query to avoid wasting bandwidth on long-lived instances with many spans.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughUpdates Go module dependencies to patch version, increases default benchmark concurrency parameters, introduces a new comprehensive MixedWorkload benchmark test with configurable workload distribution across four spammer types, adds dedicated tests for the distributeSpammers helper function, and enhances test failure handling to fatally terminate tests on timeout. Changes
Sequence DiagramsequenceDiagram
participant Test as TestMixedWorkload
participant Suite as Benchmark Suite
participant Spammers as Spammer Nodes
participant Metrics as Spamoor Metrics
participant Chain as Blockchain
Test->>Suite: Setup benchmark environment
Test->>Suite: Remove stale spammers
Test->>Test: Calculate spammer distribution<br/>(4 workload types)
loop For each workload type
Test->>Spammers: CreateSpammer (ERC20/Uniswap/Gas/Storage)
end
Test->>Test: Wait for spammers running
Test->>Metrics: Poll spamoor_transactions_sent_total<br/>(deployment target)
Metrics-->>Test: Metrics received
Test->>Metrics: Poll spamoor_transactions_sent_total<br/>(warmup target)
Metrics-->>Test: Warmup complete
Test->>Chain: Capture start block header
Test->>Metrics: Poll until steady-state<br/>transaction count reached
Metrics-->>Test: Target reached
Test->>Chain: Drain pending transactions
Test->>Chain: Capture end block header
Test->>Chain: Collect block-level metrics<br/>for range
Chain-->>Test: Metrics data
Test->>Suite: Gather execution traces
Suite-->>Test: Trace data
Test->>Metrics: Fetch final spamoor metrics
Metrics-->>Test: Final metrics (sent/failed)
Test->>Test: Assert results (duration > 0,<br/>sent > 0, failed == 0)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
|
Claude finished @chatton's task in 2m 13s —— View job Code Review:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3223 +/- ##
==========================================
+ Coverage 61.43% 61.45% +0.01%
==========================================
Files 120 120
Lines 12504 12504
==========================================
+ Hits 7682 7684 +2
+ Misses 3960 3959 -1
+ Partials 862 861 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- fail test on waitForMetricTarget timeout instead of silently continuing - bump default NumSpammers from 2 to 4 to satisfy mixed workload minimum - replace time.Sleep with metric polling for contract deployment readiness - add panic guard to distributeSpammers for total < 4 - add table-driven unit tests for distributeSpammers
Overview
Runs a benchmark test that deploys a variety of workloads
Summary by CodeRabbit
Chores
Tests