Debian Codegraph @

perf/Makefile

raw
1 BASE_IMAGE=python:3.11
2 IMAGE=pyzmq-perf
3 VOLUME=pyzmq-perf
4
5 ifeq ("$(DOCKER_MACHINE_NAME)", "")
6 OUT_PATH=$(PWD)
7 FETCH=true
8 else
9 OUT_PATH=/tmp/data
10 FETCH=docker-machine scp $(DOCKER_MACHINE_NAME):$(OUT_PATH)/*.pickle ./
11 endif
12
13 RUN=docker run --rm -v $(VOLUME):/data -it $(IMAGE)
14
15 build:
16 docker build -t $(IMAGE) .
17
18 volume:
19 docker volume inspect pyzmq-perf &> /dev/null || docker volume create $(VOLUME)
20
21 rm-volume:
22 - docker volume rm pyzmq-perf
23
24 thr:
25 $(RUN) thr
26 # fill in 10k-100k for the crossover
27 $(RUN) thr --min 4 --max 5 --points 6
28 lat:
29 $(RUN) lat
30
31 run: build volume thr lat
32
33 get-data:
34 docker run --rm -v $(OUT_PATH):/out/ -v $(VOLUME):/data -it $(BASE_IMAGE) sh -c 'cp /data/* /out/'
35 $(FETCH)