ietfparse.test benchmark utility¶
The ietfparse.test package provides the benchmark CLI described in the
Benchmarking Header Parsers guide.
It is part of the optional tests extra because the CLI depends on
typer and
rich.
Once installed, you can run it either as a console script or as a module:
Commands¶
Use the list command to inspect the packaged fixture set.
Use the run command to execute the selected benchmarks.
$ ietfparse-test run
$ ietfparse-test run --header accept --workload realistic
$ ietfparse-test run --header link --workload complex --iterations 5000 --repeat 5
$ python -m ietfparse.test run --format json
Use compare implementation to benchmark only the headers shared by the
selected implementations. The command always includes workspace.
Use diff to summarize timing changes between two saved
run --format json or compare implementation --format json outputs.
Use compare link and compare accept to inspect curated behavioral
differences across implementations.
$ ietfparse-test compare link --format json
$ ietfparse-test compare accept --format json
$ ietfparse-test compare cache-control --format json
Options¶
The run command supports:
- repeated
--header - repeated
--workload --iterations--repeat--format--quiet
Interactive terminals default to Rich output. Non-interactive stdout defaults
to JSON. Passing --format rich or --format json overrides the default.