aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-22 22:10:56 +0200
committerStefan Boberg <[email protected]>2023-05-22 22:10:56 +0200
commit2637676c203039eb75fc091be00e2ab6d879b0d0 (patch)
treec280e032736f6b15518697be2f557ebb859f3752 /src/zenserver-test/zenserver-test.cpp
parentminor: fixed typos in log output (PUTCACEHRECORD -> PUTCACHERECORD) (diff)
downloadzen-2637676c203039eb75fc091be00e2ab6d879b0d0.tar.xz
zen-2637676c203039eb75fc091be00e2ab6d879b0d0.zip
removed some old test code which is no longer useful
Diffstat (limited to 'src/zenserver-test/zenserver-test.cpp')
-rw-r--r--src/zenserver-test/zenserver-test.cpp67
1 files changed, 1 insertions, 66 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp
index f76f3e0ba..0e7c3c674 100644
--- a/src/zenserver-test/zenserver-test.cpp
+++ b/src/zenserver-test/zenserver-test.cpp
@@ -245,72 +245,7 @@ private:
//////////////////////////////////////////////////////////////////////////
-#if 0
-
-int
-main()
-{
- mi_version();
-
- zen::Sleep(1000);
-
- zen::Stopwatch timer;
-
- const int RequestCount = 100000;
-
- cpr::Session Sessions[10];
-
- for (auto& Session : Sessions)
- {
- Session.SetUrl(cpr::Url{"http://localhost:1337/test/hello"});
- //Session.SetUrl(cpr::Url{ "http://arn-wd-l0182:1337/test/hello" });
- }
-
- auto Run = [](cpr::Session& Session) {
- for (int i = 0; i < 10000; ++i)
- {
- cpr::Response Result = Session.Get();
-
- if (Result.status_code != 200)
- {
- ZEN_WARN("request response: {}", Result.status_code);
- }
- }
- };
-
- Concurrency::parallel_invoke([&] { Run(Sessions[0]); },
- [&] { Run(Sessions[1]); },
- [&] { Run(Sessions[2]); },
- [&] { Run(Sessions[3]); },
- [&] { Run(Sessions[4]); },
- [&] { Run(Sessions[5]); },
- [&] { Run(Sessions[6]); },
- [&] { Run(Sessions[7]); },
- [&] { Run(Sessions[8]); },
- [&] { Run(Sessions[9]); });
-
- // cpr::Response r = cpr::Get(cpr::Url{ "http://localhost:1337/test/hello" });
-
- ZEN_INFO("{} requests in {} ({})",
- RequestCount,
- zen::NiceTimeSpanMs(timer.GetElapsedTimeMs()),
- zen::NiceRate(RequestCount, (uint32_t)timer.GetElapsedTimeMs(), "req"));
-
- return 0;
-}
-#elif 0
-// #include <restinio/all.hpp>
-
-int
-main()
-{
- mi_version();
- restinio::run(restinio::on_thread_pool(32).port(8080).request_handler(
- [](auto req) { return req->create_response().set_body("Hello, World!").done(); }));
- return 0;
-}
-#elif ZEN_WITH_TESTS
-
+#if ZEN_WITH_TESTS
zen::ZenServerEnvironment TestEnv;
int