Debian Codegraph @

results/Makefile

raw
1 # Makefile for lmbench results.
2 # $Id$
3 #
4 # Usage: make [ LIST="aix/* sunos/* ..." ] [ what ]
5 #
6 # What to make:
7 # print Prints the results 1 per page.
8 # ps Saves the postscript of 1 per page in PS/PS
9 # 4.ps Saves the postscript of 4 per page in PS/PS4
10 # 8.ps Saves the postscript of 8 per page in PS/PS8
11 # x Previews 1 per page using groff -X
12 # summary [default] Ascii summary of the results
13 # stats Do statistics over a set of results
14 # roff Print the ascii summaries into a roff file
15 # slides Makes the pic for inclusion in slides
16 #
17 # This Makefile requires groff, gpic, and perl. You could try it with
18 # other *roff processors; I have no idea if it works.
19 #
20 # XXX - this is all out of date.
21 #
22 # There are three sorts of graphical results:
23 #
24 # 1. Bargraphs comparing each system in the LIST on the measurements listed
25 # in the BG list below (pretty much everything).
26 # 2. A 2-D graph for each system in LIST, displaying context switch times
27 # as a function of (# of processes, size of each process).
28 # 3. A 2-D graph for each system in LIST, displaying memory read times as
29 # a function of (stride size, memory size).
30 #
31 # The bargraphs are in a format of my own - the perl script in scripts
32 # called bargraph takes them as input and produces pic as output.
33 # It is a pretty straightforward format, you could probably incorparate
34 # into some Windows spreadsheet if you wanted to. See tmp/*.bg after
35 # running make in this directory.
36 #
37 # The 2-D graphs are in a format that can (probably) be read by Xgraph.
38 # I've added a few extensions for titles, etc., that you could just
39 # take out. See tmp/mem.* after running a make in this directory.
40 #
41 # This Makefile is of marginal usefulness to a site with just one machine.
42 # I intend to make results available so that people can compare, as well
43 # as a service where you can compare your results against the "best of
44 # the breed" for each vendor, as well as against best of the lot.
45
46 # List of result files to process. Defaults to everything.
47 LIST= `$(SCRIPTS)getlist $(LST)`
48
49 # Grrrrr
50 SHELL=/bin/sh
51
52 SCRIPTS=../scripts/
53 SRCS= ../scripts/allctx ../scripts/allmem ../scripts/bargraph \
54 ../scripts/bghtml ../scripts/getbg ../scripts/getbw \
55 ../scripts/getctx ../scripts/getdisk ../scripts/getlist \
56 ../scripts/getmax ../scripts/getmem ../scripts/getpercent \
57 ../scripts/getresults ../scripts/getsummary ../scripts/gifs \
58 ../scripts/graph ../scripts/html-list ../scripts/html-man \
59 ../scripts/os ../scripts/percent ../scripts/save \
60 ../scripts/stats ../scripts/xroff
61
62 MISC= tmp/misc_mhz.bg \
63 tmp/lat_ctx.bg \
64 tmp/lat_ctx8.bg \
65 tmp/lat_nullsys.bg \
66 tmp/lat_signal.bg \
67 tmp/lat_pagefault.bg \
68 tmp/lat_mappings.bg \
69 tmp/lat_fs_create.bg
70
71 PROC= tmp/lat_nullproc.bg \
72 tmp/lat_simpleproc.bg \
73 tmp/lat_shproc.bg
74
75 LATENCY= \
76 tmp/lat_pipe.bg \
77 tmp/lat_connect.bg \
78 tmp/lat_udp_local.bg \
79 tmp/lat_rpc_udp_local.bg \
80 tmp/lat_tcp_local.bg \
81 tmp/lat_rpc_tcp_local.bg
82
83 BANDWIDTH= \
84 tmp/bw_pipe.bg \
85 tmp/bw_tcp_local.bg \
86 tmp/bw_file.bg \
87 tmp/bw_reread.bg \
88 tmp/bw_mmap.bg \
89 tmp/bw_bcopy_libc.bg \
90 tmp/bw_bcopy_unrolled.bg \
91 tmp/bw_mem_rdsum.bg \
92 tmp/bw_mem_wr.bg
93
94 BG= $(MISC) $(PROC) $(LATENCY) $(BANDWIDTH)
95
96 MK=@$(MAKE) -s
97 PRINT=groff -p | lpr -h
98 PS=groff -p | $(SCRIPTS)save PS/PS
99 PS8UP=groff -p | mpage -P- -8 -a | $(SCRIPTS)save PS/PS8
100 PS4UP=groff -p | mpage -P- -4 -a | $(SCRIPTS)save PS/PS4
101 SIZE=-big
102 IMAGE=pbm
103 CLOSE=
104 GMEM=$(CLOSE) -grid -logx -xm -below
105 GCTX=$(CLOSE) -grid -below
106 GDISK=-below -close -grid -nolines
107 #IMAGE=gifmono
108
109 summary: $(SRCS)
110 @$(SCRIPTS)getsummary $(LIST)
111
112 percent: $(SRCS)
113 @$(SCRIPTS)getpercent $(LIST)
114
115 stats: $(SRCS)
116 $(SCRIPTS)getsummary $(LIST) | $(SCRIPTS)percent
117
118 roff:
119 echo .nf > summary.roff
120 echo .ft CB >> summary.roff
121 echo .ps 12 >> summary.roff
122 echo .po .35i >> summary.roff
123 echo .sp .5i >> summary.roff
124 make LIST="$(LIST)" summary >> summary.roff
125 echo .bp >> summary.roff
126 echo .sp .5i >> summary.roff
127 make LIST="$(LIST)" percent >> summary.roff
128
129 list:
130 @echo $(LIST)
131
132 print: ctx mem disk bwfile bwmem
133
134 8:
135 $(MK) LIST="$(LIST)" PRINT="groff -p | mpage -P -8 -a | lpr -h" print
136
137 8.ps 8ps 8up:
138 $(MK) LIST="$(LIST)" PRINT="$(PS8UP)" print
139
140 4.ps 4ps 4up:
141 $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" print
142
143 ps:
144 $(MK) LIST="$(LIST)" PRINT="$(PS)" print
145
146 smallps:
147 $(MK) LIST="$(LIST)" SIZE= PRINT="groff -p | $(SCRIPTS)save PS/smallPS" print
148
149 x:
150 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" print
151
152 ctx.x:
153 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" ctx
154
155 ctx.ps4:
156 $(MK) LIST="$(LIST)" PRINT="$(PS4UP)" ctx
157
158 mem.x:
159 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" mem
160
161 disk.x:
162 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" disk
163
164 bwfile.ps:
165 $(MK) LIST="$(LIST)" PRINT="$(PS)" bwfile
166
167 bwfile.x:
168 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwfile
169
170 bwmem.ps:
171 $(MK) LIST="$(LIST)" PRINT="$(PS)" bwmem
172
173 bwmem.x:
174 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" bwmem
175
176 smallx:
177 $(MK) LIST="$(LIST)" PRINT="$(SCRIPTS)xroff -p" SIZE= print
178
179 slides:
180 $(MK) LIST="$(LIST)" SIZE=-slide bargraphs.slides ctx.slides mem.slides
181
182 paper:
183 $(MK) LIST="$(LIST)" tbl.paper ctx.paper mem.paper
184
185 # XXX - this has to be made incremental, doing everything over from
186 # scratch makes you want a Ghz machine.
187 html: dirs
188 -make clean
189 #$(SCRIPTS)bghtml $(BG)
190 $(SCRIPTS)html-list $(LIST)
191 $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
192 #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
193 $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
194 GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
195 $(MK) LIST="$(LIST)" SIZE= NOOP=-noop PRINT="$(PS)" \
196 GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
197 gs -sOutputFile=HTML/ctx%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS < /dev/null
198 gs -sOutputFile=HTML/mem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.1 < /dev/null
199 gs -sOutputFile=HTML/disk%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.2 < /dev/null
200 gs -sOutputFile=HTML/bwfile%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.3 < /dev/null
201 gs -sOutputFile=HTML/bwmem%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.4 < /dev/null
202 gs -sOutputFile=HTML/ctx-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.5 < /dev/null
203 gs -sOutputFile=HTML/mem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.6 < /dev/null
204 gs -sOutputFile=HTML/bwfile-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.7 < /dev/null
205 gs -sOutputFile=HTML/bwmem-unscaled%02d.$(IMAGE) -sDEVICE=$(IMAGE) -q -dNOPAUSE PS/PS.8 < /dev/null
206 $(SCRIPTS)/gifs
207 rm HTML/*.pbm HTML/___tmp*
208
209 htmltest: dirs
210 -make clean
211 #$(SCRIPTS)bghtml $(BG)
212 $(SCRIPTS)html-list $(LIST)
213 $(MK) LIST="$(LIST)" summary > HTML/summary.out 2> HTML/summary.errs
214 #make LIST="$(LIST)" percent > HTML/percent.out 2> HTML/percent.errs
215 $(MK) LIST="$(LIST)" SIZE= PRINT="$(PS)" \
216 GMEM="$(GMEM) -cut -gthk1" GCTX="$(GCTX) -cut -gthk1" print
217
218 bghtml:
219 $(SCRIPTS)bghtml $(BG)
220
221 html-list:
222 $(SCRIPTS)html-list $(LIST)
223
224 ctx: dirs
225 $(SCRIPTS)getctx $(LIST) > tmp/FILES
226 @if [ -s tmp/FILES ]; \
227 then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
228 for i in `cat tmp/FILES`; \
229 do $(SCRIPTS)graph $(SIZE) $(GCTX) $$i; \
230 echo .bp; \
231 done | sed '$$d' | $(PRINT); \
232 else echo No context switch data in $(LIST); \
233 fi
234
235 disk: dirs
236 if [ X$(NOOP) = X ]; then \
237 $(SCRIPTS)getdisk $(LIST) > tmp/FILES; \
238 if [ -s tmp/FILES ]; \
239 then for i in `cat tmp/FILES`; \
240 do $(SCRIPTS)graph $(SIZE) $(GDISK) $$i; \
241 echo .bp; \
242 done | sed '$$d' | $(PRINT); \
243 else echo No disk data in $(LIST); \
244 fi; \
245 fi
246
247 mem: dirs
248 $(SCRIPTS)getmem $(LIST) > tmp/FILES
249 if [ -s tmp/FILES ]; \
250 then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
251 for i in `cat tmp/FILES`; \
252 do $(SCRIPTS)graph $(SIZE) $(GMEM) -nomarks $$i; \
253 echo .bp; \
254 done | sed '$$d' | $(PRINT); \
255 else echo No memory latency data in $(LIST); \
256 fi
257
258 bwfile: dirs
259 $(SCRIPTS)getbw $(LIST) > tmp/FILES
260 if [ -s tmp/FILES ]; \
261 then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
262 for i in `cat tmp/FILES`; \
263 do $(SCRIPTS)graph $(SIZE) $(GMEM) -logy $$i; \
264 echo .bp; \
265 done | sed '$$d' | $(PRINT); \
266 else echo No file bandwidth data in $(LIST); \
267 fi
268
269 bwmem: dirs
270 $(SCRIPTS)getbw -all $(LIST) > tmp/FILES
271 if [ -s tmp/FILES ]; \
272 then $(SCRIPTS)getmax $(NOOP) -graph `cat tmp/FILES`; \
273 for i in `cat tmp/FILES`; \
274 do $(SCRIPTS)graph -halfgrid -gthk_5 -thk2 -medium \
275 -nomarks -nolabels -grapheach $(GMEM) \
276 -logy %P="'`basename $$i`'" $$i; \
277 echo .bp; \
278 done | sed '$$d' | $(PRINT); \
279 else echo No memory bandwidth data in $(LIST); \
280 fi
281
282 tbl.paper:
283 $(SCRIPTS)getbg -paper $(LIST)
284
285
286 bargraphs.1st: dirs
287 $(SCRIPTS)getbg -nosort $(LIST)
288 #$(SCRIPTS)getmax -v $(PROC)
289 #$(SCRIPTS)getmax -v $(LATENCY)
290 #$(SCRIPTS)getmax -v -half $(BANDWIDTH)
291
292 bargraphs: bargraphs.1st
293 for i in $(BG); \
294 do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i; \
295 echo .bp; \
296 done | sed '$$d' | $(PRINT)
297
298 bargraphs.slides: bargraphs.1st
299 for i in $(BG); \
300 do $(SCRIPTS)bargraph $(SIZE) -nobox -sideways $$i > $${i}.pic; \
301 done
302
303 bargraphs.8up: bargraphs.1st
304 for i in $(BG); \
305 do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
306 echo .bp; \
307 done | sed '$$d' | $(PS8UP)
308
309 latency.8up: bargraphs.1st
310 for i in $(LATENCY); \
311 do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
312 echo .bp; \
313 done | sed '$$d' | $(PS8UP)
314
315 bw.8up: bargraphs.1st
316 for i in $(BANDWIDTH); \
317 do $(SCRIPTS)bargraph -sideways $(SIZE) -nobox $$i; \
318 echo .bp; \
319 done | sed '$$d' | $(PS8UP)
320
321 get: # nothing to do
322
323 clean:
324 /bin/rm -f PS/* GIF/* HTML/* tmp/* summary.roff
325 -bk clean
326
327 distclean:
328 /bin/rm -fr PS GIF HTML tmp summary.roff
329
330 dirs:
331 @if [ ! -d tmp ]; then mkdir tmp; fi
332 @if [ ! -d PS ]; then mkdir PS; fi
333 @if [ ! -d HTML ]; then mkdir HTML; fi