forked from dr-who/stutools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.old
149 lines (105 loc) · 5.14 KB
/
Makefile.old
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
GIT_VERSION := $(shell git describe --abbrev=7 --dirty --always --tags)
CC=gcc
CFLAGS=-Wall --std=c99 -Werror -DVERSION=\"$(GIT_VERSION)\" -g -pedantic -O2
DRIVE=/dev/loop3
%.o : %.c %.h
$(CC) -c $(CFLAGS) $< -o $@
all: writePairTest checkDisks flushTestWriter flushTestReader \
aioRWTest watchDisks flipBits cigarTest ramSpeedTest aioMulti \
flushTester offTheEnds deviceTimeout flushBulk ramEater aioExample \
verify repeat
readSpeedTest:
@echo use aioRWTest -r
writeSpeedTest:
@echo use aioRWTest -w
verify: verify.o positions.o devices.o cigar.o utils.o blockVerify.o
gcc $^ -o $@ -lpthread -lm
blockVerify.o: blockVerify.c positions.h devices.h utils.h
utils.o: utils.c logSpeed.h
repeat: repeat.o positions.o devices.o cigar.o utils.o blockVerify.o aioRequests.o logSpeed.o
gcc $^ -o $@ -lpthread -lm -laio
aioRequests.o: aioRequests.c logSpeed.h positions.h
#readSpeedTest: readSpeedTest.o utils.o logSpeed.o
# gcc $^ -o $@ -lpthread -lm
positionsTest: positionsTest.o positions.o cigar.o utils.o
gcc $^ -o $@ -lpthread -lm
watchDisks: watchDisks.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
offTheEnds: offTheEnds.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
flushTester: flushTester.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
ramEater: ramEater.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
flushBulk: flushBulk.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
flipBits: flipBits.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
deviceTimeout: deviceTimeout.o utils.o
gcc $^ -o $@ -lm
#writeSpeedTest: writeSpeedTest.o utils.o logSpeed.o
# gcc $^ -o $@ -lpthread -lm
writePairTest: writePairTest.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
mtWriteSpeedTest: mtWriteSpeedTest.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
mtReadSpeedTest: mtReadSpeedTest.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
checkDisks: checkDisks.o utils.o logSpeed.o aioRequests.o positions.o cigar.o devices.o
gcc $^ -o $@ -lpthread -lm -laio
devices.o: devices.c cigar.h
trim: trim.o utils.o logSpeed.o
gcc $^ -o $@ -lm
indiDisks: indiDisks.o utils.o logSpeed.o aioRequests.o positions.o cigar.o
gcc $^ -o $@ -lpthread -lm -laio
flushTestWriter: flushTestWriter.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
flushTestReader: flushTestReader.o utils.o logSpeed.o
gcc $^ -o $@ -lpthread -lm
aioRWTest: aioRWTest.o aioRequests.o logSpeed.o utils.o diskStats.o positions.o cigar.o devices.o blockVerify.o
gcc $^ -o $@ -lm -laio -lpthread
aioExample: aioExample.o aioRequests.o logSpeed.o utils.o
gcc $^ -o $@ -lm -laio -lpthread
aioMulti: aioMulti.o aioRequests.o logSpeed.o utils.o diskStats.o positions.o cigar.o devices.o
gcc $^ -o $@ -lm -laio -lpthread
positions.o: positions.c utils.h devices.h positions.h cigar.h
logSpeed.o: logSpeed.c logSpeed.h utils.h
diskStats.o: diskStats.c diskStats.h utils.h
cigar.o: cigar.c cigar.h
logSpeedTest: logSpeedTest.o utils.o logSpeed.o
statsTest: statsTest.o utils.o logSpeed.o stats.o
cigarTest: cigarTest.o cigar.o
gcc $^ -o $@ -lm
ramSpeedTest: ramSpeedTest.c utils.o logSpeed.o
TESTDB=/dev/loop0
test: positionsTest logSpeedTest
./positionsTest
sudo ./aioRWTest -w -f $(TESTDB) -t2 -v
sudo ./aioRWTest -rw -f $(TESTDB) -t2 -v
sudo ./aioRWTest -rw -s0 -f $(TESTDB) -t2 -v
sudo ./aioRWTest -rw -s1 -f $(TESTDB) -t2 -v
sudo ./aioRWTest -rw -s128 -f $(TESTDB) -t2 -v
vtest: positionsTest
valgrind --leak-check=full ./positionsTest
clean:
git clean -xdf
/bin/rm -f writeSpeedTest readSpeedTest
graph: aioRWTest
./aioRWTest -f $(DRIVE) -s 1 -j0 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j0.png
./aioRWTest -f $(DRIVE) -s 1 -j2 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j2.png
./aioRWTest -f $(DRIVE) -s 1 -j5 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j5.png
./aioRWTest -f $(DRIVE) -s 1 -j50 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j50.png
./aioRWTest -f $(DRIVE) -s 5 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s5.png
./aioRWTest -f $(DRIVE) -s 9 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s9.png
./aioRWTest -f $(DRIVE) -s 32 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s32.png
./aioRWTest -f $(DRIVE) -s 1024 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1024.png
./aioRWTest -f $(DRIVE) -s -1 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s-1.png
./aioRWTest -f $(DRIVE) -s -5 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s-5.png
./aioRWTest -f $(DRIVE) -s -9 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s-9.png
./aioRWTest -f $(DRIVE) -s -32 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s-32.png
./aioRWTest -f $(DRIVE) -s -1024 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s-1024.png
./aioRWTest -f $(DRIVE) -s 0 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s0.png
./aioRWTest -f $(DRIVE) -s 1 -j10 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j10.png
./aioRWTest -f $(DRIVE) -s 1 -j10 -P100 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j10p100.png
./aioRWTest -f $(DRIVE) -s 1 -j10 -P1000 -t1 -z -L x -v && gnuplot <gnustub && /bin/mv -f a.png s1j10p1000.png
@echo \# display "*.png" # to see the results