Skip to main content

Crate fluxbench_core

Crate fluxbench_core 

Source
Expand description

FluxBench Core - Worker Runtime

This crate provides the execution environment for benchmarks:

  • Bencher struct 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.
BenchmarkDef
Benchmark definition registered via #[flux::bench]
BenchmarkResult
Result of a single benchmark run
ChartDef
Chart definition for dashboard
CompareDef
Comparison group - groups multiple benchmarks for side-by-side comparison
GroupDef
Group definition for organizing benchmarks
Instant
High-precision instant for benchmarking
ReportDef
Report/dashboard definition
Timer
Timer for measuring benchmark iterations
TrackingAllocator
Tracking allocator that wraps the system allocator
WorkerMain
Worker main loop

Enums§

ChartType
Chart type for dashboard layout
IterationMode
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