bench_matrix/
lib.rs

1//! `bench_matrix` is a utility crate for defining and orchestrating
2//! parameterized benchmarks, allowing for the generation and execution
3//! of tests across a matrix of configurations. It offers optional
4//! integration with the Criterion benchmarking harness.
5
6// Define modules
7#[cfg(feature = "criterion_integration")]
8pub mod criterion_runner;
9pub mod generator; // For generate_combinations
10pub mod params; // For MatrixCellValue, AbstractCombination, etc. // For the Criterion-specific orchestrator
11
12// Re-export key types for easier public use
13pub use generator::generate_combinations;
14pub use params::{AbstractCombination, MatrixCellValue};
15
16// --- Re-exports for Criterion Integration (from the submodules) ---
17
18// Common types used by both async and sync criterion runners
19#[cfg(feature = "criterion_integration")]
20pub use criterion_runner::{ExtractorFn, GlobalSetupFn, GlobalTeardownFn};
21
22// Async specific exports
23#[cfg(feature = "criterion_integration")]
24pub use criterion_runner::async_suite::{
25  AsyncBenchmarkLogicFn,
26  AsyncBenchmarkSuite,
27  // Function signature types for async benchmarks
28  AsyncSetupFn,
29  AsyncTeardownFn,
30};
31
32// Sync specific exports
33#[cfg(feature = "criterion_integration")]
34pub use criterion_runner::sync_suite::{
35  SyncBenchmarkLogicFn,
36  SyncBenchmarkSuite,
37  // Function signature types for sync benchmarks
38  SyncSetupFn,
39  SyncTeardownFn,
40};