-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
61 lines (53 loc) · 1.19 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Files and directories
#
WORKDIR ?= $(CURDIR)
RESULTS ?= $(WORKDIR)
PLOT_FORMAT ?= svg
PLOT ?= $(WORKDIR)/$(notdir $(WORKDIR)).$(PLOT_FORMAT)
#
# Parameters
#
KRAFT_TOKEN ?=
# These should be contiguous on the same NUMA node
NOISOLED_CPU1 ?= 1
NOISOLED_CPU2 ?= 2
NOISOLED_CPU3 ?= 3
NOISOLED_CPU4 ?= 4
ISOLED_CPU1 ?= 5
ISOLED_CPU2 ?= 6
ISOLED_CPU3 ?= 7
#
# Tools
#
GNUPLOT ?= gnuplot
DOCKER ?= docker
#
# Targets
#
.PHONY: all
all: prepare run plot
.PHONY: prepare
prepare:
$(DOCKER) build -f $(WORKDIR)/flexos-iperf.dockerfile \
--build-arg GITHUB_TOKEN="$(KRAFT_TOKEN)" \
--tag flexos-iperf $(WORKDIR)
.PHONY: run
run:
$(DOCKER) run --rm -v $(WORKDIR):/out --privileged \
--security-opt seccomp:unconfined -ti flexos-iperf \
/root/run.sh $(ISOLED_CPU1) $(ISOLED_CPU2) $(ISOLED_CPU3) \
$(NOISOLED_CPU1) $(NOISOLED_CPU2) $(NOISOLED_CPU3) $(NOISOLED_CPU4)
.PHONY: plot
plot:
rm -rf $(PLOT)
$(DOCKER) run --rm -v $(WORKDIR):/out --privileged -ti \
ghcr.io/project-flexos/flexos-ae-plot $(GNUPLOT) /out/iperf.plot
mv $(WORKDIR)/iperf.svg $(PLOT)
.PHONY: clean
clean:
rm -rf results $(PLOT)
.PHONY: properclean
properclean: clean
$(DOCKER) image rm -f flexos-iperf
$(DOCKER) image prune -f