From dde6cc729b2a32fc0201e9a124827e4bd7e6ca99 Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 5 Jan 2018 09:36:28 -0200 Subject: Add multiprocess test files. --- blob-multiprocess/makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 blob-multiprocess/makefile (limited to 'blob-multiprocess/makefile') diff --git a/blob-multiprocess/makefile b/blob-multiprocess/makefile new file mode 100644 index 0000000..4a8cbaa --- /dev/null +++ b/blob-multiprocess/makefile @@ -0,0 +1,44 @@ +DIR = /tmp/blobs +PORT = 8000 +URI = http://127.0.0.1:8000/blobs/user +UUID = $(shell uuidgen) +PROCS ?= 4 + +all: multiproc + +server: killall + python blobs-server.py $(DIR) $(PORT) + +multiproc: + python multiproc.py --procs $(PROCS) + +roundrobin: killall + /usr/sbin/haproxy -D -f haproxy/roundrobin-$(PROCS).cfg + +killall: + -killall -9 haproxy + +data: + dd if=/dev/urandom of=/tmp/data bs=1024 count=100 + +list: + curl -X GET $(URI)/ + +put: + curl -X PUT $(URI)/$(UUID) --data-binary @/tmp/data + +get: + UUID=$(UUID); \ + curl -X PUT $(URI)/$${UUID} --data-binary @/tmp/data; \ + curl -X GET $(URI)/$${UUID} > /dev/null + +delete: + UUID=$(UUID); \ + curl -X PUT $(URI)/$${UUID} --data-binary @/tmp/data; \ + curl -X DELETE $(URI)/$${UUID} + +put-ab: + ab -c 10 -n 1000 -T /tmp/data $(URI)/$(UUID) + + +.PHONY: server multiproc roundrobin killall -- cgit v1.2.3