From 49e7efc43f015bf9cf2de4ae1b5c632d57d04970 Mon Sep 17 00:00:00 2001 From: drebs Date: Tue, 17 Oct 2017 23:14:51 -0200 Subject: [benchmarks] add test controller for scalability tests --- scripts/scalability/makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scripts/scalability/makefile (limited to 'scripts/scalability/makefile') 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 -- cgit v1.2.3