pub async fn benchmark_profiles<F>(
core: &dyn ProxyCore,
fallback_probe: &dyn HealthProbe,
make_probe: F,
profiles: &[ProfileConfig],
targets: &[ProbeTarget],
) -> Result<Vec<BenchmarkResult>>Expand description
Test every profile through the proxy core, sort healthy profiles by lowest average latency, and activate the fastest healthy profile if one exists.
When the core supports an isolated crate::core::BenchmarkSession, all profiles are
probed concurrently without touching the live proxy service until the single winning
profile is activated. Otherwise, falls back to sequential switch+reload probing.