24
24
# Automates the installation and execution of the hammerdb tests, mariadb, postgress and
25
25
# mssql.
26
26
#
27
+ TOOLS_BIN=" "
27
28
mountpoint=none
28
29
log_mount_point=" "
29
30
disklist=none
@@ -33,6 +34,8 @@ Usercount="10 20 40"
33
34
export Usercount
34
35
test_to_run=" none"
35
36
dbhosts=" none"
37
+ version=" 1.0"
38
+
36
39
usage ()
37
40
{
38
41
echo " HOST NAME or IP REQUIRED!! - see usage below"
@@ -43,6 +46,7 @@ usage()
43
46
echo " -H <Host names separated by space> - default 127.0.0.1"
44
47
echo " -d <device > - default none"
45
48
echo " -m <mount points> - default none"
49
+ echo " -T <tools dir> - Location to find the various test tools."
46
50
echo " -t <test to run> mariadb/postgres/mssql"
47
51
echo " -u <user count> - default \" 10 20 30 40 50\" "
48
52
echo " -w <warehouse count> - default " \5 00\" "
@@ -122,6 +126,7 @@ install_it()
122
126
run_hammerdb_users ()
123
127
{
124
128
uc=$1
129
+ out_file=" "
125
130
126
131
export uc
127
132
#
@@ -171,56 +176,44 @@ run_hammerdb_users()
171
176
sleep 120
172
177
else
173
178
export ctr=1
179
+ results_file=results_hammerdb_${test_to_run} .csv
180
+ if [[ ! -f $results_file ]]; then
181
+ $TOOLS_BIN /test_header_info --front_matter --results_file $results_file --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $version --test_name hammerdb_${test_to_run}
182
+ echo " # connection:TPM" >> $results_file
183
+ fi
184
+ export uc
174
185
if [[ $test_to_run == " mariadb" ]]; then
175
- export uc
176
186
cp runtest_mariadb.tcl runtest${ctr} _mariadb.tcl
177
187
out_file=" test_mariadb_${rundt} _${numhosts} pod_pod1_${uc} .out"
178
188
sed -i " s/^diset connection mysql_host.*/diset connection mysql_host ${hostnm} /" runtest${ctr} _mariadb.tcl
179
189
sed -i " s/^vuset.*/vuset vu ${uc} /" runtest${ctr} _mariadb.tcl
180
190
export outputfname=$out_file
181
191
./hammerdbcli auto runtest${ctr} _mariadb.tcl > $out_file 2>&1
182
- grep TPM $out_file | awk ' {print $7}'
183
- echo " # connection:TPM" > results_hammerdb_maria.csv
184
- for i in ` ls test_mariadb* out` ; do
185
- connections=` grep " Active Virtual Users configured" $i | cut -d: -f 2 | cut -d' ' -f 1`
186
- tpms=` grep TPM $i | cut -d' ' -f 7`
187
- echo ${connections} :${tpms} >> results_hammerdb_maria.csv
188
- done
189
192
fi
190
193
if [[ $test_to_run == " mssql" ]]; then
191
194
export whc
192
- export uc
193
195
export hostnm
196
+ export uc
194
197
out_file=" test_mssql_${rundt} _${numhosts} VM_VM${ctr} _${uc} .out"
195
198
cp runtest_mssql.tcl runtest${ctr} _mssql.tcl
196
199
sed -i " s/^diset tpcc mssqls_count_ware.*/diset tpcc mssqls_count_ware ${whc} /" runtest${ctr} _mssql.tcl
197
200
sed -i " s/^vuset.*/vuset vu ${uc} /" runtest${ctr} _mssql.tcl
198
201
export outputfname=$out_file
199
202
./hammerdbcli auto runtest${ctr} _mssql.tcl > $out_file 2>&1
200
203
echo " ${uc} User run done"
201
- grep TPM $out_file | awk ' {print $7}'
202
- echo " # connections:TPM" > results_hammerdb_mssql.csv
203
- for i in ` ls test_mssql_* out` ; do
204
- connections=` grep " Active Virtual Users configured" $i | cut -d: -f 2 | cut -d' ' -f 1`
205
- tpms=` grep TPM $i | cut -d' ' -f 7`
206
- echo ${connections} :${tpms} >> results_hammerdb_mssql.csv
207
- done
208
204
fi
209
205
if [[ $test_to_run == " postgres" ]]; then
210
- export uc
211
206
cp runtest_pg.tcl runtest${ctr} _pg.tcl
207
+ export uc
212
208
sed -i " s/^diset connection pg_host.*/diset connection pg_host ${hostnm} /" runtest${ctr} _pg.tcl
213
209
sed -i " s/^vuset.*/vuset vu ${uc} /" runtest${ctr} _pg.tcl
214
210
out_file=" test_pg_${rundt} _${numhosts} pod_pod1_${uc} .out"
215
211
export outputfname=$out_file
216
212
./hammerdbcli auto runtest${ctr} _pg.tcl > $out_file 2>&1
217
- echo " # connections:TPM" > results_hammerdb_pg.csv
218
- for i in ` ls test_pg_* out` ; do
219
- connections=` grep " Active Virtual Users configured" $i | cut -d: -f 2 | cut -d' ' -f 1`
220
- tpms=` grep TPM $i | cut -d' ' -f 7`
221
- echo ${connections} :${tpms} >> results_hammerdb_pg.csv
222
- done
223
213
fi
214
+ connections=` grep " Active Virtual Users configured" $out_file | cut -d: -f 2 | cut -d' ' -f 1`
215
+ tpms=` grep TPM $out_file | cut -d' ' -f 7`
216
+ echo ${connections} :${tpms} >> ${results_file}
224
217
ctr=$(( ctr + 1 ))
225
218
export ctr
226
219
fi
457
450
Usercount=$2
458
451
shift 2
459
452
;;
453
+ -T)
454
+ TOOLS_BIN=$2
455
+ shift 2
456
+ ;;
460
457
-t)
461
458
test_to_run=$2
462
459
shift 2
0 commit comments