feat/k8s cronjob#73
Conversation
Adds a background goroutine to continuously consume messages from the gRPC receive stream. This prevents flow control buffers from filling up on the server side, ensuring that pushed traces or responses do not eventually block the publisher's Send operations.
- Add Dockerfile with multi-stage build to compile Go binaries for Linux - Create entrypoint.sh driven by environment variables with graceful shutdown - cronjob.yaml template using ConfigMap to inject node IPs dynamically
- Use TARGETOS and TARGETARCH args in Dockerfile to compile Go binaries dynamically - Add --platform=$BUILDPLATFORM to the Go builder stage for faster cross-compilation
|
Caution Review failedFailed to post review comments 📝 WalkthroughWalkthroughThis pull request introduces infrastructure for automated P2P load testing with latency analysis capabilities. It adds batch-based publishing support to the gRPC multi-publish tool with a drain goroutine to manage stream backpressure. New latency analysis scripts compute per-message propagation latencies from trace files with statistical summaries. Shell scripts orchestrate subscriber-publisher workflows locally and via Kubernetes CronJob scheduling, including pre-test cleanup, post-test analysis, and result archiving. A Kubernetes manifest defines the scheduled load test environment with configurable parameters. Sequence Diagram(s)sequenceDiagram
participant Orchestrator as Test Orchestrator<br/>(run_test.sh/<br/>entrypoint.sh)
participant Sub as Subscriber<br/>(p2p-multi-subscribe)
participant Pub as Publisher<br/>(p2p-multi-publish)
participant TraceFile as Trace File<br/>(output)
participant Analyzer as Latency Analyzer<br/>(analyze_latency.py)
participant Summary as Summary Report
rect rgba(100, 149, 237, 0.5)
Note over Orchestrator,Summary: Load Test Execution Loop
Orchestrator->>Sub: Start subscriber<br/>(background)
Sub->>TraceFile: Write DELIVER_MESSAGE<br/>events
Orchestrator->>Pub: Run publisher<br/>(foreground)
Pub->>Sub: Send messages
Orchestrator->>Sub: Stop subscriber<br/>(after completion)
end
rect rgba(144, 238, 144, 0.5)
Note over Orchestrator,Summary: Analysis Phase
Orchestrator->>Analyzer: Invoke with trace file
Analyzer->>TraceFile: Read DELIVER_MESSAGE<br/>events
Analyzer->>Analyzer: Group by message ID<br/>Calculate latencies
Analyzer->>Summary: Output statistics<br/>(mean, p50, p90,<br/>p95, p99, max)<br/>& top 5 outliers
Orchestrator->>Summary: Append to results
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 5❌ Failed checks (5 warnings)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit
Release Notes