summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-02-23 14:45:03 +0100
committerPaweł Redman <pawel.redman@gmail.com>2018-02-23 14:45:03 +0100
commiteddca01a8fcbcfb0e3bd1e2498f06cabf9ec80c8 (patch)
tree7ff398f55b5e91a4b411e0d6c9343b9e10eb217f /Makefile
Initial commit.
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