mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
Add monitor tool
This commit is contained in:
parent
3e86d93d13
commit
c43c51362a
1 changed files with 12 additions and 12 deletions
|
@ -2,12 +2,15 @@ CXXFLAGS = -std=c++11 -O2 -I..
|
|||
|
||||
THEAD_POOL_COUNT = 16
|
||||
|
||||
BENCH_CMD = bombardier -c 8 -d 5s localhost:8080
|
||||
# BENCH_CMD = wrk -d 5s http://localhost:8080
|
||||
BENCH = bombardier -l -c 10 -d 5s localhost:8080
|
||||
MONITOR = ali http://localhost:8080
|
||||
|
||||
# cpp-httplib
|
||||
bench: server
|
||||
@./server & export PID=$$!; $(BENCH_CMD); kill $${PID}
|
||||
@./server & export PID=$$!; $(BENCH); kill $${PID}
|
||||
|
||||
monitor: server
|
||||
@./server & export PID=$$!; $(MONITOR); kill $${PID}
|
||||
|
||||
run : server
|
||||
@./server
|
||||
|
@ -17,7 +20,10 @@ server : cpp-httplib/main.cpp ../httplib.h
|
|||
|
||||
# crow
|
||||
bench-crow: server-crow
|
||||
@./server-crow & export PID=$$!; $(BENCH_CMD); kill $${PID}
|
||||
@./server-crow & export PID=$$!; $(BENCH); kill $${PID}
|
||||
|
||||
monitor-crow: server-crow
|
||||
@./server-crow & export PID=$$!; $(MONITOR); kill $${PID}
|
||||
|
||||
run-crow : server-crow
|
||||
@./server-crow
|
||||
|
@ -25,15 +31,9 @@ run-crow : server-crow
|
|||
server-crow : crow/main.cpp
|
||||
g++ -o $@ $(CXXFLAGS) crow/main.cpp
|
||||
|
||||
# flask
|
||||
bench-flask:
|
||||
@FLASK_APP=flask/main.py flask run --port=8080 & export PID=$$!; $(BENCH_CMD); kill $${PID}
|
||||
|
||||
run-flask:
|
||||
@FLASK_APP=flask/main.py flask run --port=8080
|
||||
|
||||
# misc
|
||||
bench-all: bench bench-crow bench-flask
|
||||
issue:
|
||||
$(BENCH)
|
||||
|
||||
clean:
|
||||
rm -rf server*
|
||||
|
|
Loading…
Reference in a new issue