HeadlinesBriefing favicon HeadlinesBriefing.com

keybench offers scriptable benchmarking for KV stores

Hacker News •
×

Developer guycipher released keybench 0.1.0, a POSIX‑only tool that lets engineers write KV‑store workloads in Lua and run them against multiple backends. The script defines a unit of work—such as a cart checkout—and keybench measures both workload units per second and raw primitive operations per second, reporting detailed latency histograms for each operation type.

The harness spawns worker threads, each loading the Lua script in an isolated state and executing it against a chosen engine. Backends register as plugins under a simple vtable, so adding a new store requires only a new directory and a build flag. The default in‑memory skiplist engine provides a reference, while persistent options like RocksDB compile with a single make flag.

Keybench outputs human‑readable console reports, TSV files, and live timeline streams, while also printing a status line to stderr during runs. Users can bound benchmarks by operation count or elapsed seconds, control thread count, batch size, and random seed. The tool fills a gap left by sysbench and HammerDB for sorted key‑value databases, giving developers a reproducible way to compare engine performance.