aboutsummaryrefslogtreecommitdiff
path: root/tests/perf-client
diff options
context:
space:
mode:
authorjrmoulton <[email protected]>2025-06-10 15:47:54 -0600
committerjrmoulton <[email protected]>2025-06-10 15:48:36 -0600
commitcfad9798ff99d4de0571a512d156b5fe1ef1d427 (patch)
treefc3bf670f82d139de19466cddad1e909db7f3d2e /tests/perf-client
parentfc342915e6155dec7bafa3e135da7f37a9a07f5c (diff)
parent6186d111a5c150946ee5b7e9e68d987a38c1a463 (diff)
merge new embassy changes
Diffstat (limited to 'tests/perf-client')
-rw-r--r--tests/perf-client/Cargo.toml6
-rw-r--r--tests/perf-client/src/lib.rs9
2 files changed, 7 insertions, 8 deletions
diff --git a/tests/perf-client/Cargo.toml b/tests/perf-client/Cargo.toml
index eb2a33a30..e31d6361b 100644
--- a/tests/perf-client/Cargo.toml
+++ b/tests/perf-client/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
4edition = "2021" 4edition = "2021"
5 5
6[dependencies] 6[dependencies]
7embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } 7embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] }
8embassy-time = { version = "0.3.2", path = "../../embassy-time", features = ["defmt", ] } 8embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", ] }
9embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } 9embassy-futures = { version = "0.1.0", path = "../../embassy-futures" }
10defmt = "0.3.0" 10defmt = "1.0.1"
diff --git a/tests/perf-client/src/lib.rs b/tests/perf-client/src/lib.rs
index 54762379a..4bd9e5674 100644
--- a/tests/perf-client/src/lib.rs
+++ b/tests/perf-client/src/lib.rs
@@ -2,7 +2,6 @@
2 2
3use defmt::{assert, *}; 3use defmt::{assert, *};
4use embassy_futures::join::join; 4use embassy_futures::join::join;
5use embassy_net::driver::Driver;
6use embassy_net::tcp::TcpSocket; 5use embassy_net::tcp::TcpSocket;
7use embassy_net::{Ipv4Address, Stack}; 6use embassy_net::{Ipv4Address, Stack};
8use embassy_time::{with_timeout, Duration, Timer}; 7use embassy_time::{with_timeout, Duration, Timer};
@@ -13,7 +12,7 @@ pub struct Expected {
13 pub updown_kbps: usize, 12 pub updown_kbps: usize,
14} 13}
15 14
16pub async fn run<D: Driver>(stack: &Stack<D>, expected: Expected) { 15pub async fn run(stack: Stack<'_>, expected: Expected) {
17 info!("Waiting for DHCP up..."); 16 info!("Waiting for DHCP up...");
18 while stack.config_v4().is_none() { 17 while stack.config_v4().is_none() {
19 Timer::after_millis(100).await; 18 Timer::after_millis(100).await;
@@ -38,7 +37,7 @@ const DOWNLOAD_PORT: u16 = 4321;
38const UPLOAD_PORT: u16 = 4322; 37const UPLOAD_PORT: u16 = 4322;
39const UPLOAD_DOWNLOAD_PORT: u16 = 4323; 38const UPLOAD_DOWNLOAD_PORT: u16 = 4323;
40 39
41async fn test_download<D: Driver>(stack: &Stack<D>) -> usize { 40async fn test_download(stack: Stack<'_>) -> usize {
42 info!("Testing download..."); 41 info!("Testing download...");
43 42
44 let mut rx_buffer = [0; RX_BUFFER_SIZE]; 43 let mut rx_buffer = [0; RX_BUFFER_SIZE];
@@ -78,7 +77,7 @@ async fn test_download<D: Driver>(stack: &Stack<D>) -> usize {
78 kbps 77 kbps
79} 78}
80 79
81async fn test_upload<D: Driver>(stack: &Stack<D>) -> usize { 80async fn test_upload(stack: Stack<'_>) -> usize {
82 info!("Testing upload..."); 81 info!("Testing upload...");
83 82
84 let mut rx_buffer = [0; RX_BUFFER_SIZE]; 83 let mut rx_buffer = [0; RX_BUFFER_SIZE];
@@ -118,7 +117,7 @@ async fn test_upload<D: Driver>(stack: &Stack<D>) -> usize {
118 kbps 117 kbps
119} 118}
120 119
121async fn test_upload_download<D: Driver>(stack: &Stack<D>) -> usize { 120async fn test_upload_download(stack: Stack<'_>) -> usize {
122 info!("Testing upload+download..."); 121 info!("Testing upload+download...");
123 122
124 let mut rx_buffer = [0; RX_BUFFER_SIZE]; 123 let mut rx_buffer = [0; RX_BUFFER_SIZE];