summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8167998
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+SHELL := /bin/bash
+
+DATA := data/nyc-old.log.gz \
+ data/euro.log.gz \
+ data/nyc.log.gz
+REPORTS := $(DATA:data/%.log.gz=reports/%.log)
+
+PLOTS := population ping ping-distrib
+PLOT_IMAGES := $(PLOTS:%=out/%.png)
+
+all: $(PLOT_IMAGES)
+
+out/%.png: $(REPORTS)
+ @echo "Plotting $@"
+ @mkdir -p out
+ @cat $(REPORTS) | ./plot.sh "$*" "$@"
+
+reports/%.log: data/%.log.gz
+ @echo "Analyzing $<"
+ @mkdir -p `dirname "$@"`
+ @zcat "$<" | ./stalinizer.py > "$@"
+
+clean_all: clean
+ rm -rf reports
+
+clean:
+ rm -rf out
+
+.PRECIOUS: $(REPORTS)
+.PHONY: clean clean_all