Skip to content

Commit 256a67b

Browse files
committed
Added highload-tests
1 parent 2587050 commit 256a67b

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ wsjcpp-light-web-server
33
.logs/*
44
__pycache__
55
.vscode/*
6+
highload-tests/*.log

highload-tests/test_ab.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# ln -s `pwd`/../web /var/www/html/wsjcpp-light-web-server
4+
5+
echo "Apache"
6+
ab -n 10000 -c 10 http://localhost/wsjcpp-light-web-server/ > localhost_apache.log
7+
echo "wsjcpp"
8+
ab -n 10000 -c 10 http://localhost:1234/ > localhost_wsjcpp.log

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main(int argc, const char* argv[]) {
2727

2828
WSJCppLightWebServer httpServer;
2929
httpServer.setPort(1234);
30-
httpServer.setMaxWorkers(1);
30+
httpServer.setMaxWorkers(4);
3131
if (sType == "folder") {
3232
httpServer.addHandler((WSJCppLightWebHttpHandlerBase *)new WSJCppLightWebHttpHandlerWebFolder("/app/", sDir));
3333
httpServer.addHandler((WSJCppLightWebHttpHandlerBase *)new WSJCppLightWebHttpHandlerWebFolder("/", sDir));

0 commit comments

Comments
 (0)