Expand description
FluxBench Core - Worker Runtime
This crate provides the execution environment for benchmarks:
Bencherstruct for iteration-based benchmarking- High-precision timing (RDTSC with Instant fallback)
- Global allocator interceptor for memory tracking
- CPU affinity pinning for stable TSC readings
Structs§
- Bencher
- The Bencher provides iteration control for benchmarks.
- Benchmark
Def - Benchmark definition registered via
#[flux::bench] - Benchmark
Result - Result of a single benchmark run
- Chart
Def - Chart definition for dashboard
- Compare
Def - Comparison group - groups multiple benchmarks for side-by-side comparison
- Group
Def - Group definition for organizing benchmarks
- Instant
- High-precision instant for benchmarking
- Report
Def - Report/dashboard definition
- Timer
- Timer for measuring benchmark iterations
- Tracking
Allocator - Tracking allocator that wraps the system allocator
- Worker
Main - Worker main loop
Enums§
- Chart
Type - Chart type for dashboard layout
- Iteration
Mode - Mode of iteration for the benchmark
- Severity
- Severity levels for CI integration
Constants§
- HAS_
CYCLE_ COUNTER - Whether this platform provides hardware cycle counters (x86_64 RDTSCP or AArch64 CNTVCT_EL0).
When
false, cycle counts are reported as 0 and only wall-clock nanoseconds are available. Whether this platform provides real cycle counters.
Functions§
- current_
allocation - Get current allocation statistics
- reset_
allocation_ counter - Reset allocation counters (call before each iteration)
- run_
benchmark_ loop - Run the full benchmark loop: warmup → measurement → finish