ZTHROTTLE-CORE // EMBEDDABLE BENCHMARK ENGINE

// four real benchmarks · multi-axis contention profiler · live system-monitor harvest · persistent SQLite tree index — one command surface, embeddable in any host

Engineering Report Source

zthrottle-core is the embeddable engine behind zthrottle, a desktop system-stress and benchmark tool. It owns four real single-axis benchmarks (storage throughput/IOPS, network throughput/latency, compute, memory bandwidth/latency), the contention profiler that drives every axis simultaneously and measures the interaction rather than four isolated numbers, a live system-monitor harvest (processes, CPU, memory, disks, per-interface network) and a persistent SQLite directory-tree index — and exposes all of them through one command surface (Engine::invoke), so every host drives identical behaviour. It carries no GUI and no platform UI deps, and it also serves the mountable frontend, so the standalone app and every embed share the exact same code. The crate builds as rlib for native Rust/Tauri hosts and as staticlib/cdylib for non-Rust hosts over a C ABI. Paid product; early-stage and in active development.

Four Benchmarks

Disk (direct I/O, page-cache-bypassing), network (loopback + peer throughput and RTT), multi-threaded compute, and memory bandwidth + latency — each a real device measurement behind bench.disk / bench.net / bench.cpu / bench.mem.

Contention Profiler

bench.contention loads every axis at once and returns the degradation matrix plus the bottleneck-migration timeline — the world-first surface this engine exists for.

Monitor + Tree

Optional monitor feature (sysinfo) harvests processes/CPU/memory/disks/network and sends signals; optional treedb feature (bundled SQLite) persists the directory tree for instant load + mtime-diff refresh.

Embeddable

One command surface — Engine::invoke(cmd, args_json) — drives every host identically: native Rust, a Tauri v2 plugin (zth_invoke), or a C/C++ host over the FFI. Live facts (progress samples, event signals) are pushed through an installed event sink.

Quick start

use zthrottle_core::Engine;
use serde_json::json;

let mut engine = Engine::new();

// One dotted command surface for every host.
let caps = engine.invoke("capabilities", &json!({}))?;

// Run a single axis, then the contention profiler across all of them.
let disk = engine.invoke("bench.disk", &json!({ "seconds": 3 }))?;
let prof = engine.invoke("bench.contention", &json!({}))?;

Surfaces

Depend on the rlib and call Engine directly, or go through Engine::invoke with JSON for parity across hosts. Enable the tauri feature to mount the engine as a Tauri v2 plugin and serve the bundled frontend. Link the staticlib/cdylib and call zth_invoke from a C ABI host (see include/zthrottle_core.h). Asynchronous facts — live throughput samples during a run, start/finish signals — are pushed to the host through an installed event sink.

Where it goes next

See the source for the module map and command list, and the MenkeTechnologiesMeta umbrella for the wider stack this engine plugs into.