feat(runner): use per-benchmark TLS mode instead of global mode

This commit is contained in:
2026-02-25 16:18:20 +02:00
parent 07cae6df55
commit ea2a07d5aa
3 changed files with 22 additions and 57 deletions

View File

@@ -2,7 +2,6 @@ use crate::{
config::{BenchmarkConfig, Config},
error::{self, ConfigError},
};
use common::{self, KeyExchangeMode};
use miette::{NamedSource, SourceSpan};
use std::path::Path;
@@ -31,21 +30,6 @@ fn validate_benchmark(
) -> error::Result<()> {
let src = NamedSource::new(path.display().to_string(), content.to_string());
// Validate mode
if benchmark.mode.parse::<KeyExchangeMode>().is_err() {
return Err(ConfigError::ValidationError {
src,
span: find_field_span(content, idx, "mode"),
field: "mode".into(),
idx,
message: format!(
"Invalid key exchange mode '{}'. Valid values: 'x25519', 'x25519mlkem768'",
benchmark.mode
),
}
.into());
}
validate_positive_field(src.clone(), content, idx, "payload", benchmark.payload)?;
validate_positive_field(src.clone(), content, idx, "iters", benchmark.iters)?;
validate_positive_field(src, content, idx, "concurrency", benchmark.concurrency)?;