T=$(filter-out lib.sh,$(wildcard *.sh))
-.PHONY: $(T)
+.PHONY: $(T:%=run-%)
-all: $(T) html
+all: $(T:%=run-%) html
@echo "Run 'make plot' to generate graphs"
TEST_FLAGS = -P -t all
-$(T):%:
- ./$@ $(TEST_FLAGS)
+$(T:%=run-%):run-%:
+ ./$* $(TEST_FLAGS)
.PHONY: plot plotall
-PLOT_SCRIPTS=$(shell find results -name plot.sh)
-THUMBS=$(PLOT_SCRIPTS:%/plot.sh=%/thumb)
-plot: $(THUMBS)
-%/thumb: %/plot.sh
- $*/plot.sh -X
-
-plotall: $(PLOT_SCRIPTS:%=run-%)
-$(PLOT_SCRIPTS:%=run-%):
- ${@:run-%=%} -X
+PLOT_SCRIPTS=$(shell find results -name plot.sh)
+define plot_template
+plot: $1/thumb
+$1/thumb: $1/plot.sh $(notdir $1).sh $(wildcard $1/*.txt)
+ $1/plot.sh -X
+endef
+
+define plotall_template
+plotall: plot-$1
+.PHONY: plot-$1
+plot-$1:
+ $1/plot.sh -X
+endef
+
+$(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plot_template,$(result_dir))))
+$(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plotall_template,$(result_dir))))
.PHONY: html
html:
. lib.sh
main() {
- :
+ ln -s ../nop-highprio/*.txt .
}
plot_cmds() {
set xlabel "Time [s]"
set ylabel "Latency [{/Symbol m}s]"
plot [:] [:500] \
- "../nop-highprio/len2-msgs.txt" using 2:(1000000*$14) with points title "2 byte messages", \
- "../nop-highprio/len4-msgs.txt" using 2:(1000000*$14) with points title "4 byte messages", \
- "../nop-highprio/len6-msgs.txt" using 2:(1000000*$14) with points title "6 byte messages", \
- "../nop-highprio/len8-msgs.txt" using 2:(1000000*$14) with points title "8 byte messages"
+ "len2-msgs.txt" using 2:(1000000*$14) with points title "2 byte messages", \
+ "len4-msgs.txt" using 2:(1000000*$14) with points title "4 byte messages", \
+ "len6-msgs.txt" using 2:(1000000*$14) with points title "6 byte messages", \
+ "len8-msgs.txt" using 2:(1000000*$14) with points title "8 byte messages"
EOF
}
. lib.sh
main() {
- :
+ ln -s ../nop-highprio/*.txt .
}
plot_cmds() {
set xlabel "Time [s]"
set ylabel "Latency [{/Symbol m}s]"
plot [:] [:500] \
- "../nop/len2-msgs.txt" using 2:(1000000*$14) with points title "2 byte messages", \
- "../nop/len4-msgs.txt" using 2:(1000000*$14) with points title "4 byte messages", \
- "../nop/len6-msgs.txt" using 2:(1000000*$14) with points title "6 byte messages", \
- "../nop/len8-msgs.txt" using 2:(1000000*$14) with points title "8 byte messages"
+ "len2-msgs.txt" using 2:(1000000*$14) with points title "2 byte messages", \
+ "len4-msgs.txt" using 2:(1000000*$14) with points title "4 byte messages", \
+ "len6-msgs.txt" using 2:(1000000*$14) with points title "6 byte messages", \
+ "len8-msgs.txt" using 2:(1000000*$14) with points title "8 byte messages"
EOF
}