mirror of
https://github.com/kristoferssolo/tls-pq-bench.git
synced 2026-03-22 00:36:21 +00:00
test: add payload protocol tests and refactor write_results
This commit is contained in:
@@ -17,6 +17,8 @@ toml.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
tracing.workspace = true
|
||||
uuid.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
claims.workspace = true
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -12,6 +12,10 @@ use common::{
|
||||
protocol::{read_payload, write_request},
|
||||
};
|
||||
use miette::miette;
|
||||
use runner::{
|
||||
args::Args,
|
||||
config::{load_from_cli, load_from_file},
|
||||
};
|
||||
use rustls::{
|
||||
ClientConfig, DigitallySignedStruct, SignatureScheme,
|
||||
client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
|
||||
@@ -35,9 +39,6 @@ use tracing::info;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use uuid::Uuid;
|
||||
|
||||
use runner::args::Args;
|
||||
use runner::config::{load_from_cli, load_from_file};
|
||||
|
||||
/// Result of a single benchmark iteration.
|
||||
struct IterationResult {
|
||||
handshake_ns: u64,
|
||||
@@ -261,8 +262,11 @@ fn spawn_single_iteration(
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(clippy::future_not_send)] // dyn Write is not Send
|
||||
async fn write_results(output: &mut dyn Write, tasks: Vec<ReturnHandle>) -> miette::Result<()> {
|
||||
// #[allow(clippy::future_not_send)] // dyn Write is not Send
|
||||
async fn write_results<W: Write + Send>(
|
||||
output: &mut W,
|
||||
tasks: Vec<ReturnHandle>,
|
||||
) -> miette::Result<()> {
|
||||
for task in tasks {
|
||||
let (_result, record) = task.await.expect("task should not panic");
|
||||
if let Some(record) = record {
|
||||
|
||||
Reference in New Issue
Block a user