Repository navigation
Crate vyrn bench
crates/vyrn-bench · test-only in spec 11 §1.4 · split (11 §1.3) · library and binary vyrn-bench
11 §1.3 describes the benchmark harness: traffic generator, echo server, microbenchmark drivers, histogram export and report signing (§7). On main the crate holds the deterministic workload generator and the latency-histogram export. bench/workloads/FORMAT.md defines both formats (VYRN-GEN v1 and VYRN-HIST v1). The generator is a pure function of its config and seed, so it yields the same packets byte for byte on every build and target (B4).
- 02 §6 (workloads; configs in bench/workloads)
- 11 §7.1 rule 4 (deterministic generator, integer arithmetic only)
- 11 §7.1 rules 5 and 8 (HDR histograms with 1 ns resolution up to 10 µs, an overflow list, raw counts)
| Type | Role |
|---|---|
config::Config (with Class, Mix, Phase, BookModel, Dist) |
A workload config, such as wl-ref.toml
|
generator::Generator, GenOptions
|
Config + seed → request packets |
generator::Packet, MsgKind, Stats
|
One generated packet, message kinds, counts |
stream::write_stream, parse_stream, StreamHeader
|
The VYRN-GEN v1 stream file |
hist::LatencyHist, Sample, Req
|
VYRN-HIST v1 export, with the max kept with its request |
rng::Xoshiro256, rng::SplitMix64
|
The seeded PRNGs |
fixed::log2_q32, exp2_q32, neg_ln_q32
|
Integer math used in place of floats |
Implemented (partial)
- The binary has two subcommands:
genwrites a workload stream andhistprints the percentiles of aVYRN-HISTexport. There is no echo server, no microbenchmark driver and no report signing. -
generator.rs: "it has novyrn-mdfeed and no sequencer counters, so the model book is the fixed BBO of [crate::config::BookModel], and the mix controller of 02 §6.10 and the lane pacer of 02 §6.9 belong to the rig that sends the packets. Handles are placeholders". - It does not link or load
libvyrn_vx_oracleyet, so it has no B12 cross-check. - Tests: 31
#[test]. tests/generator.rs has 11 and tests/hist.rs has 6. Insrc/,rng.rshas 6,fixed.rs5 andgenerator.rs3. - The crate produces no benchmark numbers. Values in 11 §7 are budgets.
| Crates | |
|---|---|
Code (Cargo.toml) |
vyrn-types, -crypto, -wire, -cut, -risk, -bbo, -lane, -engine, -nic, -log; hdrhistogram, blake3
|
| 11 §1.4 | engine crates, vyrn-nic, vyrn-log, libvyrn_vx_oracle
|
Missing: libvyrn_vx_oracle. The source uses only vyrn-types, vyrn-crypto and vyrn-wire. The other declared crates are not used yet.
- Code: crates/vyrn-bench
- Spec: Spec-11-Build, Spec-02-Requirements
- Related: Building-Testing-Benchmarking, Vx-Oracle-and-Client, Crate-vyrn-engine
Overview
Working on VYRN
Spec
- 00 Index
- 01 Conventions
- 02 Requirements
- 03 Architecture
- 04 Protocol
- 05 Engine
- 06 Platform
- 07 Replication
- 08 Epochs
- 09 Chain
- 10 Accounts, Risk, MD
- 11 Build
- 12 Commitment
- 13 Availability
- 14 Envelope
Engine crates
Other crates
- vyrn-nic
- vyrn-log
- vyrn-data
- vyrn-consensus
- vyrn-replica
- vyrn-epoch
- vyrn-chain
- vyrn-md
- vyrn-sim
- vyrn-bench
Binaries
- vyrn-seq (stub)
- vyrn-validator (stub)
- vyrn-admin
Outside Rust
Reflects main at a9f0d61.