-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
84 lines (73 loc) · 2.93 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
RESULT_SETS = pre post
# The following octane benchmarks do too few nursery GCs to be useful:
# Mandreel
# NavierStokes
# Gameboy
# zlib
OCTANE_BENCHMARKS = Richards DeltaBlue Crypto RayTrace EarleyBoyer RegExp \
Splay PdfJS CodeLoad Box2D Typescript
# The following talos benchmarks also do too few nursery GCs to be useful:
# tp6_*
TALOS_BENCHMARKS = ares6 speedometer
GRAPH_FILES = $(foreach set, $(RESULT_SETS), \
$(foreach benchmark, $(OCTANE_BENCHMARKS), \
output/octane/$(set)/$(benchmark).svg) \
$(foreach benchmark, $(TALOS_BENCHMARKS), \
output/talos/$(set)/$(benchmark).svg))
HTML_FILES = output/index.html \
$(foreach benchmark, $(OCTANE_BENCHMARKS), \
output/octane/$(benchmark).html) \
$(foreach benchmark, $(TALOS_BENCHMARKS), \
output/talos/$(benchmark).html)
DATA_FILES = $(foreach set, $(RESULT_SETS), \
$(foreach benchmark, $(OCTANE_BENCHMARKS), \
data/octane/$(set)/$(benchmark).dat)) \
$(foreach set, $(RESULT_SETS), \
$(foreach benchmark, $(TALOS_BENCHMARKS), \
data/talos/$(set)/$(benchmark).dat))
all: $(DATA_FILES) $(GRAPH_FILES) $(HTML_FILES)
.PHONY: clean
clean:
rm -rf data/* output/*
# Split octane results into separate files for each sub benchmark.
.SECONDEXPANSION:
data/octane/%.dat: results/octane/$$(*D).txt
mkdir -p $(@D)
bin/splitResults $(@D) $<
# Extract data from talos log files with special case for ARES6.
data/talos/%.dat: results/talos/%.txt bin/extractTalos
mkdir -p $(@D)
bin/extractTalos $< > $@
data/talos/%/ares6.dat: results/talos/%/ares6.txt bin/extractAres6
mkdir -p $(@D)
bin/extractAres6 $< > $@
# Plot a graph for each benchmark.
output/%.svg: data/%.dat
mkdir -p $(@D)
gnuplot -e "\
set terminal svg size $(shell bin/calcSize $^); \
set xlabel 'Collection'; \
set ylabel 'Nursery size'; \
set y2label 'Promotion rate / %'; \
set border 11 back; \
set xtics nomirror; \
set ytics nomirror; \
set y2tics; \
plot [][0:16][][0:20] '$^' using 1 with linespoints title 'Nursery size', \
'' using 2 with linespoints axes x1y2 title 'Promotion rate'; " > $@
# Generate HTML to compare graphs side by side.
output/%.html: Makefile
mkdir -p $(@D)
echo '<title>Results for $(*F)</title>' > $@
echo '<h1>Results for $(*F)</h1>' >> $@
echo '$(foreach set, $(RESULT_SETS), <h2>$(set)</h2><p><img src="./$(set)/$(*F).svg"></p>)' >> $@
output/index.html: Makefile
mkdir -p $(@D)
echo '<title>Benchmark results</title>' > $@
echo '<h1>Benchmark results</h1>' >> $@
echo '<h2>Octane</h2>' >> $@
echo '<ul>$(foreach benchmark, $(OCTANE_BENCHMARKS), \
<li><a href="./octane/$(benchmark).html">$(benchmark)</a></li>)</ul>' >> $@
echo '<h2>Talos</h2>' >> $@
echo '<ul>$(foreach benchmark, $(TALOS_BENCHMARKS), \
<li><a href="./talos/$(benchmark).html">$(benchmark)</a></li>)</ul>' >> $@