Skip to content

Commit 8008128

Browse files
authored
Merge pull request #29 from redhat-performance/add_meta
Add meta data. Remove duplicate results entry.
2 parents f1b0696 + ebb42c2 commit 8008128

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

hammerdb/hammerdb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ pushd /usr/local > /dev/null
295295
rm -rf $test
296296
popd > /dev/null
297297
cd $exec_dir
298-
echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} > run_this
298+
echo ./run_hammerdb -m /perf1 -t ${test} ${users_to_run} ${warehouses} ${log_mount} -T ${TOOLS_BIN} > run_this
299299
chmod 755 run_this
300300
./run_this
301301

hammerdb/run_hammerdb

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
# Automates the installation and execution of the hammerdb tests, mariadb, postgress and
2525
# mssql.
2626
#
27+
TOOLS_BIN=""
2728
mountpoint=none
2829
log_mount_point=""
2930
disklist=none
@@ -33,6 +34,8 @@ Usercount="10 20 40"
3334
export Usercount
3435
test_to_run="none"
3536
dbhosts="none"
37+
version="1.0"
38+
3639
usage()
3740
{
3841
echo " HOST NAME or IP REQUIRED!! - see usage below"
@@ -43,6 +46,7 @@ usage()
4346
echo " -H <Host names separated by space> - default 127.0.0.1"
4447
echo " -d <device > - default none"
4548
echo " -m <mount points> - default none"
49+
echo " -T <tools dir> - Location to find the various test tools."
4650
echo " -t <test to run> mariadb/postgres/mssql"
4751
echo " -u <user count> - default \"10 20 30 40 50\""
4852
echo " -w <warehouse count> - default "\500\""
@@ -122,6 +126,7 @@ install_it()
122126
run_hammerdb_users()
123127
{
124128
uc=$1
129+
out_file=""
125130

126131
export uc
127132
#
@@ -171,56 +176,44 @@ run_hammerdb_users()
171176
sleep 120
172177
else
173178
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
174185
if [[ $test_to_run == "mariadb" ]]; then
175-
export uc
176186
cp runtest_mariadb.tcl runtest${ctr}_mariadb.tcl
177187
out_file="test_mariadb_${rundt}_${numhosts}pod_pod1_${uc}.out"
178188
sed -i "s/^diset connection mysql_host.*/diset connection mysql_host ${hostnm}/" runtest${ctr}_mariadb.tcl
179189
sed -i "s/^vuset.*/vuset vu ${uc}/" runtest${ctr}_mariadb.tcl
180190
export outputfname=$out_file
181191
./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
189192
fi
190193
if [[ $test_to_run == "mssql" ]]; then
191194
export whc
192-
export uc
193195
export hostnm
196+
export uc
194197
out_file="test_mssql_${rundt}_${numhosts}VM_VM${ctr}_${uc}.out"
195198
cp runtest_mssql.tcl runtest${ctr}_mssql.tcl
196199
sed -i "s/^diset tpcc mssqls_count_ware.*/diset tpcc mssqls_count_ware ${whc}/" runtest${ctr}_mssql.tcl
197200
sed -i "s/^vuset.*/vuset vu ${uc}/" runtest${ctr}_mssql.tcl
198201
export outputfname=$out_file
199202
./hammerdbcli auto runtest${ctr}_mssql.tcl > $out_file 2>&1
200203
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
208204
fi
209205
if [[ $test_to_run == "postgres" ]]; then
210-
export uc
211206
cp runtest_pg.tcl runtest${ctr}_pg.tcl
207+
export uc
212208
sed -i "s/^diset connection pg_host.*/diset connection pg_host ${hostnm}/" runtest${ctr}_pg.tcl
213209
sed -i "s/^vuset.*/vuset vu ${uc}/" runtest${ctr}_pg.tcl
214210
out_file="test_pg_${rundt}_${numhosts}pod_pod1_${uc}.out"
215211
export outputfname=$out_file
216212
./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
223213
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}
224217
ctr=$((ctr + 1))
225218
export ctr
226219
fi
@@ -457,6 +450,10 @@ do
457450
Usercount=$2
458451
shift 2
459452
;;
453+
-T)
454+
TOOLS_BIN=$2
455+
shift 2
456+
;;
460457
-t)
461458
test_to_run=$2
462459
shift 2

0 commit comments

Comments
 (0)