From 61f8c3e78ca592844c9ff543738a78bb3f472f86 Mon Sep 17 00:00:00 2001 From: Fred Suter Date: Mon, 31 Oct 2022 10:34:58 -0400 Subject: [PATCH] extend test --- teshsuite/s4u/io-stream/io-stream.cpp | 17 ++++++++++++++++- teshsuite/s4u/io-stream/io-stream.tesh | 11 ++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/teshsuite/s4u/io-stream/io-stream.cpp b/teshsuite/s4u/io-stream/io-stream.cpp index 8bc80aff85..d6b69af58a 100644 --- a/teshsuite/s4u/io-stream/io-stream.cpp +++ b/teshsuite/s4u/io-stream/io-stream.cpp @@ -49,7 +49,6 @@ static void streamer(size_t size) write->wait(); XBT_INFO(" Total : %.6f seconds", sg4::Engine::get_clock() - clock); - XBT_INFO("[Bob -> Alice] Streaming (Read bottleneck)"); clock = sg4::Engine::get_clock(); sg4::Io::streamto(bob, bob_disk, alice, alice_disk, size); @@ -69,6 +68,22 @@ static void streamer(size_t size) XBT_INFO(" Total : %.6f seconds", sg4::Engine::get_clock() - clock); bt1->wait(); bt2->wait(); + + XBT_INFO("[Bob -> Alice] Streaming \"from disk to memory\" (no write)"); + clock = sg4::Engine::get_clock(); + sg4::Io::streamto(bob, bob_disk, alice, nullptr, size); + XBT_INFO(" Total : %.6f seconds", sg4::Engine::get_clock() - clock); + + XBT_INFO("[Bob -> Alice] Streaming \"from memory to disk\" (no read)"); + clock = sg4::Engine::get_clock(); + sg4::Io::streamto(bob, nullptr, alice, alice_disk, size); + XBT_INFO(" Total : %.6f seconds", sg4::Engine::get_clock() - clock); + + XBT_INFO("[Bob -> Bob] Disk to disk (no transfer)"); + clock = sg4::Engine::get_clock(); + sg4::Io::streamto(bob, bob_disk, bob, bob_disk, size); + XBT_INFO(" Total : %.6f seconds", sg4::Engine::get_clock() - clock); + } int main(int argc, char** argv) diff --git a/teshsuite/s4u/io-stream/io-stream.tesh b/teshsuite/s4u/io-stream/io-stream.tesh index 53a722ec97..f2dbda3579 100644 --- a/teshsuite/s4u/io-stream/io-stream.tesh +++ b/teshsuite/s4u/io-stream/io-stream.tesh @@ -13,4 +13,13 @@ $ ${bindir:=.}/io-stream --cfg=host/model:sio_S22 "--log=root.fmt:[%10.6r]%e[%i > [ 11.000050] [1:streamer@bob] [Bob -> Alice] Streaming (Read bottleneck) > [ 15.000100] [1:streamer@bob] Total : 4.000050 seconds > [ 15.000100] [1:streamer@bob] [Bob -> Alice] Streaming (Write bottleneck) -> [ 23.000150] [1:streamer@bob] Total : 8.000050 seconds \ No newline at end of file +> [ 23.000150] [1:streamer@bob] Total : 8.000050 seconds +> [ 23.000150] [1:streamer@bob] Start two 10-second background traffic between Bob and Alice +> [ 23.000150] [1:streamer@bob] [Bob -> Alice] Streaming (Transfer bottleneck) +> [ 29.000200] [1:streamer@bob] Total : 6.000050 seconds +> [ 45.000200] [1:streamer@bob] [Bob -> Alice] Streaming "from disk to memory" (no write) +> [ 49.000250] [1:streamer@bob] Total : 4.000050 seconds +> [ 49.000250] [1:streamer@bob] [Bob -> Alice] Streaming "from memory to disk" (no read) +> [ 51.000300] [1:streamer@bob] Total : 2.000050 seconds +> [ 51.000300] [1:streamer@bob] [Bob -> Bob] Disk to disk (no transfer) +> [ 59.000300] [1:streamer@bob] Total : 8.000000 seconds \ No newline at end of file -- 2.20.1