From ce8f48837d30ce9b4116094abfcda07ebe065e72 Mon Sep 17 00:00:00 2001 From: Francis CLAIRICIA-ROSE-CLAIRE-JOSEPHINE Date: Thu, 20 Jun 2024 16:55:50 +0200 Subject: [PATCH] Benchmarks: Moved clients impl --- .../src/{datagram_echoclient/client.rs => datagram.rs} | 0 benchmark_server/src/datagram_echoclient/main.rs | 9 ++++----- benchmark_server/src/lib.rs | 3 +++ .../src/{stream_echoclient/client.rs => stream.rs} | 0 benchmark_server/src/stream_echoclient/main.rs | 9 ++++----- 5 files changed, 11 insertions(+), 10 deletions(-) rename benchmark_server/src/{datagram_echoclient/client.rs => datagram.rs} (100%) rename benchmark_server/src/{stream_echoclient/client.rs => stream.rs} (100%) diff --git a/benchmark_server/src/datagram_echoclient/client.rs b/benchmark_server/src/datagram.rs similarity index 100% rename from benchmark_server/src/datagram_echoclient/client.rs rename to benchmark_server/src/datagram.rs diff --git a/benchmark_server/src/datagram_echoclient/main.rs b/benchmark_server/src/datagram_echoclient/main.rs index 7b50f3c3..7f227f43 100644 --- a/benchmark_server/src/datagram_echoclient/main.rs +++ b/benchmark_server/src/datagram_echoclient/main.rs @@ -6,13 +6,12 @@ use std::{ time::{Duration, Instant}, }; -use benchmark_server::report::{Report, RequestReport, TestReport}; +use benchmark_server::{ + datagram::DatagramClient, + report::{Report, RequestReport, TestReport}, +}; use clap::{Parser, ValueEnum}; -mod client; - -use client::DatagramClient; - #[derive(Debug, Parser, Clone)] struct Args { #[arg(long = "msize", default_value_t = 1024, help = "message size in bytes")] diff --git a/benchmark_server/src/lib.rs b/benchmark_server/src/lib.rs index fcd5f323..52ca40b1 100644 --- a/benchmark_server/src/lib.rs +++ b/benchmark_server/src/lib.rs @@ -1,3 +1,6 @@ +#![allow(clippy::assigning_clones)] #![forbid(unsafe_code)] +pub mod datagram; pub mod report; +pub mod stream; diff --git a/benchmark_server/src/stream_echoclient/client.rs b/benchmark_server/src/stream.rs similarity index 100% rename from benchmark_server/src/stream_echoclient/client.rs rename to benchmark_server/src/stream.rs diff --git a/benchmark_server/src/stream_echoclient/main.rs b/benchmark_server/src/stream_echoclient/main.rs index 5901018b..7ac838af 100644 --- a/benchmark_server/src/stream_echoclient/main.rs +++ b/benchmark_server/src/stream_echoclient/main.rs @@ -6,13 +6,12 @@ use std::{ time::{Duration, Instant}, }; -use benchmark_server::report::{Report, RequestReport, TestReport}; +use benchmark_server::{ + report::{Report, RequestReport, TestReport}, + stream::StreamClient, +}; use clap::{Parser, ValueEnum}; -mod client; - -use client::StreamClient; - #[derive(Debug, Parser, Clone)] struct Args { #[arg(long = "msize", default_value_t = 1024, help = "message size in bytes")]