@@ -99,7 +99,7 @@ TEST_CASE("benchmark counter func coro::sync_wait(coro::when_all(awaitable)) x10
9999 std::apply ([&counter](auto &&... t) { ((counter += t.return_value ()), ...); }, tasks);
100100 }
101101
102- print_stats (" benchmark counter func coro::sync_wait(coro::when_all(awaitable))" , iterations, start, sc::now ());
102+ print_stats (" benchmark counter func coro::sync_wait(coro::when_all(awaitable)) x10 " , iterations, start, sc::now ());
103103 REQUIRE (counter == iterations);
104104}
105105
@@ -128,7 +128,7 @@ TEST_CASE("benchmark counter func coro::sync_wait(coro::when_all(vector<awaitabl
128128 }
129129 }
130130
131- print_stats (" benchmark counter func coro::sync_wait(coro::when_all(awaitable)) " , iterations, start, sc::now ());
131+ print_stats (" benchmark counter func coro::sync_wait(coro::when_all(vector< awaitable>)) x10 " , iterations, start, sc::now ());
132132 REQUIRE (counter == iterations);
133133}
134134
@@ -406,26 +406,26 @@ TEST_CASE("benchmark tcp::server echo server thread pool", "[benchmark]")
406406 auto pstatus = co_await client.poll (coro::poll_op::read);
407407 if (pstatus != coro::poll_status::event)
408408 {
409- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::closed);
409+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::closed);
410410 // the socket has been closed
411411 break ;
412412 }
413413
414- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
414+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::event);
415415
416416 auto [rstatus, rspan] = client.recv (in);
417417 if (rstatus == coro::net::recv_status::closed)
418418 {
419- REQUIRE_THREAD_SAFE (rspan.empty ());
419+ // REQUIRE_THREAD_SAFE(rspan.empty());
420420 break ;
421421 }
422- REQUIRE_THREAD_SAFE (rstatus == coro::net::recv_status::ok);
422+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::recv_status::ok);
423423
424424 in.resize (rspan.size ());
425425
426426 auto [sstatus, remaining] = client.send (in);
427- REQUIRE_THREAD_SAFE (sstatus == coro::net::send_status::ok);
428- REQUIRE_THREAD_SAFE (remaining.empty ());
427+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::send_status::ok);
428+ // REQUIRE_THREAD_SAFE(remaining.empty());
429429 }
430430
431431 std::cerr << " wait_for_clients.count_down(1) -> " << wait_for_clients.remaining () << " \n " ;
@@ -478,24 +478,24 @@ TEST_CASE("benchmark tcp::server echo server thread pool", "[benchmark]")
478478 coro::net::tcp::client client{client_scheduler};
479479
480480 auto cstatus = co_await client.connect (); // std::chrono::seconds{1});
481- REQUIRE_THREAD_SAFE (cstatus == coro::net::connect_status::connected);
481+ // REQUIRE_THREAD_SAFE(cstatus == coro::net::connect_status::connected);
482482
483483 for (size_t i = 1 ; i <= messages_per_connection; ++i)
484484 {
485485 auto req_start = std::chrono::steady_clock::now ();
486486 auto [sstatus, remaining] = client.send (msg);
487- REQUIRE_THREAD_SAFE (sstatus == coro::net::send_status::ok);
488- REQUIRE_THREAD_SAFE (remaining.empty ());
487+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::send_status::ok);
488+ // REQUIRE_THREAD_SAFE(remaining.empty());
489489
490490 auto pstatus = co_await client.poll (coro::poll_op::read);
491- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
491+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::event);
492492
493493 std::string response (64 , ' \0 ' );
494494 auto [rstatus, rspan] = client.recv (response);
495- REQUIRE_THREAD_SAFE (rstatus == coro::net::recv_status::ok);
496- REQUIRE_THREAD_SAFE (rspan.size () == msg.size ());
495+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::recv_status::ok);
496+ // REQUIRE_THREAD_SAFE(rspan.size() == msg.size());
497497 response.resize (rspan.size ());
498- REQUIRE_THREAD_SAFE (response == msg);
498+ // REQUIRE_THREAD_SAFE(response == msg);
499499
500500 auto req_stop = std::chrono::steady_clock::now ();
501501 histogram[std::chrono::duration_cast<std::chrono::milliseconds>(req_stop - req_start)]++;
@@ -557,7 +557,7 @@ TEST_CASE("benchmark tcp::server echo server thread pool", "[benchmark]")
557557TEST_CASE (" benchmark tcp::server echo server inline" , " [benchmark]" )
558558{
559559 const constexpr std::size_t connections_per_client = 10 ;
560- const constexpr std::size_t messages_per_connection = 2 ;
560+ const constexpr std::size_t messages_per_connection = 10'000 ;
561561 // const constexpr std::size_t ops = connections * messages_per_connection;
562562 const constexpr std::size_t ops = connections_per_client * messages_per_connection;
563563
@@ -606,26 +606,26 @@ TEST_CASE("benchmark tcp::server echo server inline", "[benchmark]")
606606 auto pstatus = co_await client.poll (coro::poll_op::read);
607607 if (pstatus != coro::poll_status::event)
608608 {
609- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::closed);
609+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::closed);
610610 // the socket has been closed
611611 break ;
612612 }
613613
614- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
614+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::event);
615615
616616 auto [rstatus, rspan] = client.recv (in);
617617 if (rstatus == coro::net::recv_status::closed)
618618 {
619- REQUIRE_THREAD_SAFE (rspan.empty ());
619+ // REQUIRE_THREAD_SAFE(rspan.empty());
620620 break ;
621621 }
622- REQUIRE_THREAD_SAFE (rstatus == coro::net::recv_status::ok);
622+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::recv_status::ok);
623623
624624 in.resize (rspan.size ());
625625
626626 auto [sstatus, remaining] = client.send (in);
627- REQUIRE_THREAD_SAFE (sstatus == coro::net::send_status::ok);
628- REQUIRE_THREAD_SAFE (remaining.empty ());
627+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::send_status::ok);
628+ // REQUIRE_THREAD_SAFE(remaining.empty());
629629 }
630630
631631 s.live_clients --;
@@ -694,24 +694,24 @@ TEST_CASE("benchmark tcp::server echo server inline", "[benchmark]")
694694 // Wait before retrying
695695 co_await c.scheduler ->yield_for (std::chrono::milliseconds{500 });
696696 }
697- REQUIRE_THREAD_SAFE (cstatus == coro::net::connect_status::connected);
697+ // REQUIRE_THREAD_SAFE(cstatus == coro::net::connect_status::connected);
698698
699699 for (size_t i = 1 ; i <= messages_per_connection; ++i)
700700 {
701701 auto req_start = std::chrono::steady_clock::now ();
702702 auto [sstatus, remaining] = client.send (msg);
703- REQUIRE_THREAD_SAFE (sstatus == coro::net::send_status::ok);
704- REQUIRE_THREAD_SAFE (remaining.empty ());
703+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::send_status::ok);
704+ // REQUIRE_THREAD_SAFE(remaining.empty());
705705
706706 auto pstatus = co_await client.poll (coro::poll_op::read);
707- REQUIRE_THREAD_SAFE (pstatus == coro::poll_status::event);
707+ // REQUIRE_THREAD_SAFE(pstatus == coro::poll_status::event);
708708
709709 std::string response (64 , ' \0 ' );
710710 auto [rstatus, rspan] = client.recv (response);
711- REQUIRE_THREAD_SAFE (rstatus == coro::net::recv_status::ok);
712- REQUIRE_THREAD_SAFE (rspan.size () == msg.size ());
711+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::recv_status::ok);
712+ // REQUIRE_THREAD_SAFE(rspan.size() == msg.size());
713713 response.resize (rspan.size ());
714- REQUIRE_THREAD_SAFE (response == msg);
714+ // REQUIRE_THREAD_SAFE(response == msg);
715715
716716 auto req_stop = std::chrono::steady_clock::now ();
717717 histogram[std::chrono::duration_cast<std::chrono::milliseconds>(req_stop - req_start)]++;
@@ -834,13 +834,13 @@ TEST_CASE("benchmark tls::server echo server thread pool", "[benchmark]")
834834 switch (rstatus)
835835 {
836836 case coro::net::tls::recv_status::ok:
837- REQUIRE_THREAD_SAFE (rstatus == coro::net::tls::recv_status::ok);
837+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::tls::recv_status::ok);
838838 data = std::string_view{rspan.begin (), rspan.end ()};
839839 // std::cerr << "SERVER CONNECTION: recv() -> " << data << "\n";
840840 break ;
841841 case coro::net::tls::recv_status::closed:
842842 // std::cerr << "SERVER CONNECTION: closed\n";
843- REQUIRE_THREAD_SAFE (rspan.empty ());
843+ // REQUIRE_THREAD_SAFE(rspan.empty());
844844 closed = true ;
845845 break ;
846846 case coro::net::tls::recv_status::want_read:
@@ -866,8 +866,8 @@ TEST_CASE("benchmark tls::server echo server thread pool", "[benchmark]")
866866
867867 // std::cerr << "SERVER CONNECTION: client.send()\n";
868868 auto [sstatus, remaining] = co_await client.send (data);
869- REQUIRE_THREAD_SAFE (sstatus == coro::net::tls::send_status::ok);
870- REQUIRE_THREAD_SAFE (remaining.empty ());
869+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::tls::send_status::ok);
870+ // REQUIRE_THREAD_SAFE(remaining.empty());
871871 // std::cerr << "SERVER CONNECTION: send() -> " << data << "\n";
872872 }
873873
@@ -927,7 +927,7 @@ TEST_CASE("benchmark tls::server echo server thread pool", "[benchmark]")
927927 client_scheduler, std::make_shared<coro::net::tls::context>(coro::net::tls::verify_peer_t ::no)};
928928
929929 auto cstatus = co_await client.connect ();
930- REQUIRE_THREAD_SAFE (cstatus == coro::net::tls::connection_status::connected);
930+ // REQUIRE_THREAD_SAFE(cstatus == coro::net::tls::connection_status::connected);
931931
932932 std::string in (64 , ' \0 ' );
933933 auto closed = false ;
@@ -938,8 +938,8 @@ TEST_CASE("benchmark tls::server echo server thread pool", "[benchmark]")
938938
939939 auto [sstatus, remaining] = co_await client.send (msg);
940940 // std::cerr << "CLIENT: send() -> " << msg << "\n";
941- REQUIRE_THREAD_SAFE (sstatus == coro::net::tls::send_status::ok);
942- REQUIRE_THREAD_SAFE (remaining.empty ());
941+ // REQUIRE_THREAD_SAFE(sstatus == coro::net::tls::send_status::ok);
942+ // REQUIRE_THREAD_SAFE(remaining.empty());
943943
944944 // std::cerr << "CLIENT: recv()\n";
945945 auto [rstatus, rspan] = co_await client.recv (in, {std::chrono::seconds{30 }});
@@ -948,15 +948,15 @@ TEST_CASE("benchmark tls::server echo server thread pool", "[benchmark]")
948948 {
949949 case coro::net::tls::recv_status::ok:
950950 {
951- REQUIRE_THREAD_SAFE (rstatus == coro::net::tls::recv_status::ok);
951+ // REQUIRE_THREAD_SAFE(rstatus == coro::net::tls::recv_status::ok);
952952 auto data = std::string_view{rspan.begin (), rspan.end ()};
953- REQUIRE_THREAD_SAFE (data.length () > 0 );
953+ // REQUIRE_THREAD_SAFE(data.length() > 0);
954954 // std::cerr << "CLIENT: recv() -> " << data << "\n";
955955 }
956956 break ;
957957 case coro::net::tls::recv_status::closed:
958958 // std::cerr << "CLIENT: closed\n";
959- REQUIRE_THREAD_SAFE (rspan.empty ());
959+ // REQUIRE_THREAD_SAFE(rspan.empty());
960960 closed = true ;
961961 break ;
962962 case coro::net::tls::recv_status::want_read:
0 commit comments