diff options
Diffstat (limited to 'scripts/scalability/makefile')
-rw-r--r-- | scripts/scalability/makefile | 63 |
1 files changed, 52 insertions, 11 deletions
diff --git a/scripts/scalability/makefile b/scripts/scalability/makefile index 0a248d37..0067c650 100644 --- a/scripts/scalability/makefile +++ b/scripts/scalability/makefile @@ -1,14 +1,53 @@ +# Test Controller for Server Scalability Tests +# ============================================ +# +# This makefile knows how to install server and client components of the Test +# Controller, as well as to trigger a run of the benchmarks. +# +# Test Controller server +# ---------------------- +# +# In the server, run the following to have an instance of the Test Controller +# server running: +# +# make install-server +# make start-server +# +# And, if you want to see the logs, use: +# +# make log +# +# Alternativelly, use `make start-server-nodaemon` to avoid detaching from the +# terminal. +# +# Test Controller client +# ---------------------- +# +# Make sure an instance of the Test Controller Server is reachable at $(URI), +# and run: +# +# make install-client +# make run-test + + +URI = https://giraffe.cdev.bitmask.net:7001 + PIDFILE = /tmp/test_controller.pid LOGFILE = /tmp/test_controller.log TACFILE = ./test_controller/server/server.tac -HTTP_PORT = 7001 -RESOURCE = cpu -CREATE = 1000 -start: + +#----------------# +# Server targets # +#----------------# + +install-server: + pip install ".[server]" + +start-server: twistd --pidfile=$(PIDFILE) --logfile=$(LOGFILE) --python=$(TACFILE) -nodaemon: +start-server-nodaemon: twistd --nodaemon --python=$(TACFILE) kill: @@ -19,11 +58,13 @@ log: restart: kill start -post: - curl -X POST http://127.0.0.1:$(HTTP_PORT)/$(RESOURCE)?pid=$(PID) -get: - curl -X GET http://127.0.0.1:$(HTTP_PORT)/$(RESOURCE) +#----------------# +# Client targets # +#----------------# + +install-client: + pip install ".[client]" -setup: - curl -X POST http://127.0.0.1:$(HTTP_PORT)/setup?create=$(CREATE) +test: + (cd test_controller/client && make test URI=$(URI)) |