diff options
author | drebs <drebs@riseup.net> | 2017-10-17 23:14:51 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-11-02 09:36:29 -0200 |
commit | 49e7efc43f015bf9cf2de4ae1b5c632d57d04970 (patch) | |
tree | 6b56ad78c71de5544c44d91b8e1c21161ec483f9 /scripts/scalability/makefile | |
parent | 17b4ab3d98439cf5e7e7893da1f1b9f6a08ab82c (diff) |
[benchmarks] add test controller for scalability tests
Diffstat (limited to 'scripts/scalability/makefile')
-rw-r--r-- | scripts/scalability/makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/scalability/makefile b/scripts/scalability/makefile new file mode 100644 index 00000000..e99717fc --- /dev/null +++ b/scripts/scalability/makefile @@ -0,0 +1,28 @@ +PIDFILE = /tmp/test_controller.pid +LOGFILE = /tmp/test_controller.log +TACFILE = ./test_controller/server/server.tac +HTTP_PORT = 7001 +RESOURCE = cpu + +start: + twistd --pidfile=$(PIDFILE) --logfile=$(LOGFILE) --python=$(TACFILE) + +nodaemon: + twistd --nodaemon --python=$(TACFILE) + +kill: + [ -f $(PIDFILE) ] && kill -9 $$(cat $(PIDFILE)) + +log: + tail -F $(LOGFILE) + +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) + +setup: + curl -X POST http://127.0.0.1:$(HTTP_PORT)/setup |