MCPcopy Create free account
hub / github.com/hashintel/hash / run_benchmark_matrix

Function run_benchmark_matrix

tests/graph/benches/policy/benchmark_matrix.rs:181–201  ·  view source on GitHub ↗

Run benchmark matrix.

(crit: &mut Criterion, matrix: &BenchmarkMatrix)

Source from the content-addressed store, hash-verified

179
180/// Run benchmark matrix.
181pub fn run_benchmark_matrix(crit: &mut Criterion, matrix: &BenchmarkMatrix) {
182 let configs = matrix.generate_configs();
183
184 // Group configs by seed level to avoid duplicate seeding
185 let mut by_seed_level = std::collections::HashMap::new();
186 for config in configs {
187 by_seed_level
188 .entry(config.seed)
189 .or_insert_with(Vec::new)
190 .push(config);
191 }
192
193 for (seed_level, seed_configs) in by_seed_level {
194 eprintln!(
195 "Setting up seed level: {:?} for {} configurations",
196 seed_level,
197 seed_configs.len()
198 );
199 run_benchmark_seed_group(crit, seed_level, seed_configs);
200 }
201}
202
203/// Run all benchmark configs for a single seed level (shared seeding).
204fn run_benchmark_seed_group(

Callers 1

bench_resolve_policiesFunction · 0.85

Calls 4

run_benchmark_seed_groupFunction · 0.85
generate_configsMethod · 0.80
entryMethod · 0.80
pushMethod · 0.65

Tested by

no test coverage detected