python scripts/run_benchmarks.py --output work/benchmarks/local.json# A short smoke run; use the defaults or longer runs for performance reporting.
python scripts/run_benchmarks.py --targets js --samples 1 32 512 --round-ms 10 --warmup-ms 10 --rounds 3
# Longer measurement, with a separate build directory and output record.
python scripts/run_benchmarks.py --round-ms 250 --warmup-ms 1000 --rounds 9 --target-dir work/benchmark-long --output work/benchmarks/long.json| Operation | Included in each timed iteration |
|---|---|
| encode | New builder, generated setters for all fields and samples, message framing with finish(), output fingerprint. Input-array preparation is excluded. |
| selected_read | Fresh read_message, generated root/list views, job ID, list length, first and last sample values, checksum. With one sample, both value accesses refer to that sample. |
| full_scan | Fresh read_message, generated getters for every field, both text decodes and every sample, checksum over the values. This traverses views; it does not allocate an application object per sample. |
| pack | Packing the prepared uncompressed message, including output allocation and fingerprint. |
| unpack | Unpacking the prepared packed message, including output allocation and fingerprint. Parsing the unpacked message is excluded. |
| opaque_copy | Fresh message reader and builder, deep copy through root_pointer().set(...), finish() and output fingerprint. No generated schema is used during the copy. |
Install
Download zipCap'n Proto serialization runtime and schema code generation for MoonBit.