Skip to content
Snippets Groups Projects
Commit 6afbf1d3 authored by Florian Fischer's avatar Florian Fischer
Browse files

[ConcurrentNetworkEchoTest] scale work with the available CPUs and log_level

The chosen amounts of echos take on my 16 core ryzen system ~5seconds.
This should hopefully reduce CI timeout where we are not sure if they are
bugs or legit timeouts. Furthermore this should reduce the amount of logs
we write and have to store after each CI run.
parent f0cd1d3c
No related branches found
No related tags found
1 merge request!262[ConcurrentNetworkEchoTest] scale work with the available CPUs and log_level
...@@ -3,13 +3,16 @@ ...@@ -3,13 +3,16 @@
#include <cstdlib> #include <cstdlib>
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <thread>
#include <vector> #include <vector>
#include "Common.hpp" #include "Common.hpp"
#include "CountingPrivateSemaphore.hpp" #include "CountingPrivateSemaphore.hpp"
#include "Debug.hpp"
#include "Emper.hpp" #include "Emper.hpp"
#include "Fiber.hpp" #include "Fiber.hpp"
#include "Runtime.hpp" #include "Runtime.hpp"
#include "emper-config.h"
#include "emper.hpp" #include "emper.hpp"
#include "fixtures/network.hpp" #include "fixtures/network.hpp"
#include "io.hpp" #include "io.hpp"
...@@ -21,8 +24,8 @@ auto main(int argc, char* argv[]) -> int { ...@@ -21,8 +24,8 @@ auto main(int argc, char* argv[]) -> int {
exit(77); exit(77);
} }
unsigned int client_count = 10; unsigned int client_count = std::thread::hardware_concurrency() * 4;
unsigned int echos = 500; unsigned int echos = EMPER_LOG_LEVEL > Info ? 250 : 25000;
std::string port = "4241"; std::string port = "4241";
std::string host = "127.0.0.1"; std::string host = "127.0.0.1";
...@@ -40,6 +43,9 @@ auto main(int argc, char* argv[]) -> int { ...@@ -40,6 +43,9 @@ auto main(int argc, char* argv[]) -> int {
echos = strtol(argv[2], nullptr, DECIMAL); echos = strtol(argv[2], nullptr, DECIMAL);
} }
std::cout << "ConcurrentNetworkEchoTest with " << client_count << " clients sending " << echos
<< " echos" << std::endl;
Runtime runtime; Runtime runtime;
Fiber* listener = Fiber* listener =
......
...@@ -93,6 +93,5 @@ tests += [ ...@@ -93,6 +93,5 @@ tests += [
'name': 'ConcurrentNetworkEchoTest', 'name': 'ConcurrentNetworkEchoTest',
'description': 'Concurrent network echo test with 10 clients', 'description': 'Concurrent network echo test with 10 clients',
'test_suite': 'io', 'test_suite': 'io',
'args': ['10', '10000'],
}, },
] ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment