Skip to content

tiny_bench_config.h — Configuration Macros

TinyBench uses three compile-time configuration macros to control table sizes and name limits. These are defined in tiny_bench_config.h and can be overridden at build time with -D flags.

Macro Default Description
TINY_BENCH_MAX_DATA 16 Maximum number of named data slots in the bench. Determines how many distinct named buffers can be registered simultaneously.
TINY_BENCH_MAX_TOOLS 32 Maximum number of registered tools. Limits the size of the tool registry table.
TINY_BENCH_NAME_LEN 24 Maximum length of a name string, including the terminating '\0'. Applied to both data slot names and tool names.

Override Example

To change defaults at compile time:

gcc -DTINY_BENCH_MAX_DATA=32 -DTINY_BENCH_MAX_TOOLS=64 -DTINY_BENCH_NAME_LEN=32 ...

Or by editing tiny_bench_config.h directly.