Bench¶
TinyBench — Runtime Named Registry for Data and Tools
TinyBench is a queryable named workbench. Agents or users can discover "what data is available" and "what tools are available" at runtime via MQTT. It is the foundation for TinyOrch workflow orchestration.
Architecture¶
-
Data Slots
Named data buffers
put(name, data, len, type)/get(name)/list()
Zero-copy — stores pointers only, no data duplication -
Tool Registry
Named callable functions
register_tool(name, fn, in_type, out_type)
Registration with type signatures + runtime query -
Type System
Every data slot and tool carries a type tag
Compile-time friendly enumtiny_type_t
Type validation performed during flow definition -
MQTT Remote Control
BENCH,TOOLS/BENCH,DATA/BENCH,TEST
Remotely query bench status in real time
Responses published to/mqtt/node
Quick Start¶
#include "tiny_bench.h"
tiny_bench_t bench;
tiny_bench_init(&bench);
// Put data onto the bench
float raw[1024] = {0};
tiny_bench_put(&bench, "raw_0", raw, sizeof(raw), TINY_TYPE_F32_ARR);
// Register a tool
tiny_bench_register_tool(&bench, "butterworth", my_filter_fn,
TINY_TYPE_F32_ARR, TINY_TYPE_F32_ARR);
// Query
const char *names[16];
int n = tiny_bench_list_tools(&bench, names, 16); // → 1
Position¶
TinyBench is the foundation layer of the Tiny* ecosystem:
- Depends downward on tinydamage / tinysysid / tinydsp / tinymath and other algorithm modules
- Provides a runtime namespace for data and tools used by TinyOrch upward
- Can be used independently of TinyOrch — just the bench is sufficient for data and tool query management