Skip to content

performance

Thomas Mangin edited this page Apr 8, 2026 · 1 revision

Pre-Alpha. This page describes behavior that may change.

ze-perf is a BGP propagation latency benchmark tool. It measures how long it takes for BGP UPDATE messages to propagate through a device under test (DUT) by establishing sender and receiver sessions, injecting routes from the sender, and timing their arrival at the receiver. The tool produces per-route latency distributions, convergence times, and throughput numbers.

Subcommands

run

Run a benchmark against a BGP DUT. The sender establishes a BGP session with the DUT and injects a set of routes. The receiver establishes a separate session and measures how long each route takes to arrive. Multiple iterations are run and the results are aggregated.

ze-perf run --dut-addr 172.31.0.2 --dut-asn 65000
ze-perf run --dut-addr 172.31.0.2 --dut-asn 65000 --routes 10000 --json
ze-perf run --dut-addr 172.31.0.2 --dut-asn 65000 --family ipv6/unicast
ze-perf run --dut-addr 172.31.0.2 --dut-asn 65000 --force-mp --repeat 10

report

Generate a comparison report from one or more result JSON files. Supports Markdown tables (default), self-contained HTML, and full documentation with methodology disclaimers.

ze-perf report result-ze.json result-gobgp.json
ze-perf report --html result-ze.json result-gobgp.json > report.html
ze-perf report --doc result-*.json > docs/performance.md

track

Track performance history over time from an NDJSON file and detect regressions. In --check mode, exits non-zero if any metric has regressed beyond the configured threshold.

ze-perf track history.ndjson
ze-perf track --check history.ndjson
ze-perf track --html history.ndjson > trend.html
ze-perf track --check --threshold-convergence 15 history.ndjson

Key flags for run

Flag Default Purpose
--dut-addr (required) DUT BGP address.
--dut-asn (required) DUT autonomous system number.
--dut-port 179 DUT BGP port.
--dut-name unknown DUT implementation name (for reports).
--dut-version DUT version string (for reports).
--sender-addr 127.0.0.1 Sender local address.
--sender-asn 65001 Sender autonomous system number.
--receiver-addr 127.0.0.2 Receiver local address.
--receiver-asn 65002 Receiver autonomous system number.
--routes 1000 Number of routes to inject.
--family ipv4/unicast Address family (ipv4/unicast or ipv6/unicast).
--force-mp false Force MP_REACH_NLRI encoding for IPv4 unicast.
--seed 0 (random) Deterministic PRNG seed for route generation.
--repeat 5 Number of benchmark iterations.
--warmup-runs 1 Warmup iterations (discarded from results).
--warmup 2s Delay after session establishment before injecting.
--duration 60s Maximum time to wait for convergence per iteration.
--batch-size 0 (auto) NLRIs per UPDATE message (0 = auto-max within 4096 bytes).
--passive-listen false Listen on port 179 for inbound DUT connections (requires root).
--json false JSON output.
--output Write JSON results to file (implies --json).

Make targets

make ze-perf          # Build the ze-perf binary
make ze-perf-bench    # Run a benchmark against the local Ze instance
make ze-perf-report   # Generate a comparison report from result files
make ze-perf-track    # Check history for regressions

Docker test infrastructure

The test/perf/ directory contains the Docker-based benchmark infrastructure. It includes DUT configurations, run scripts (run.py), and a results/ directory for storing benchmark output. The Docker setup launches Ze (and optionally other implementations) in containers with isolated networking so that benchmarks are reproducible across machines.

See also

  • Testing for the full test suite overview.
  • Building for the Make targets that produce the binaries.

Home

About

First Steps

Configuration

Operation

Interfaces

Plugins

Plugin Development

Chaos Testing

Blueprints

Development

Reference

Clone this wiki locally