mirror of
https://github.com/logos-messaging/logos-delivery.git
synced 2026-07-20 11:40:02 +00:00
apps/benchmarks/message_path_bench.nim replays the WakuMessage inbound pipeline two ways: micro (in-process, drives the relay's registered ordered-validator + topicHandler + full uniqueTopicHandler dispatch chain over relay/archive/store-sync, no network) and macro (two in-process nodes over loopback gossipsub, publisher -> receiver with archive + sync, capturing the libp2p observer decodes). Fixed-seed workload (seed 42), 10/50/150 kB at 25/50/25 %, N=1000 + warmup, unique per-message payload prefix + timestamp to avoid dedup. Emits a human block + CSV line per scenario (msg/s, ns/msg p50/p99, decodes/ hashes per msg, decoded/hashed MB, occupied-mem delta, GC stats); micro runs twice for a determinism check. Paced macro publishing keeps the single loopback send queue from overflowing so all N are delivered. New nimble task benchMessagePath builds with -d:msgPathCounters and links librln (the node stack pulls RLN transitively) then runs it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>