Nikpraskaton,
I tried on my laptop an saved all steps.
This is step by step summary:
I do everything in homedir assuming that tpcc-mysql installed and located on ~/tpcc-mysql/ and gnuplot installed too
cd ~/tpcc-mysql/
create db
mysql -u root -p -e “CREATE DATABASE tpcc1000;”
mysql -u root -p tpcc1000 < create_table.sql
mysql -u root -p tpcc1000 < add_fkey_idx.sql
run tpcc, save output
./tpcc_load 127.0.0.1 tpcc1000 root “[COLOR=#FF0000]” 3
./tpcc_start -h127.0.0.1 -dtpcc1000 -uroot -p[COLOR=#FF0000] -w3 -c8 -r5 -l180 > ~/tpcc-output.log
generate datafile
cd ~/
./tpcc-output-analyze.sh ~/tpcc-output.log > tpcc-data.txt
generate graph
./tpcc-graph-build.sh tpcc-data.txt
==================================================
file: tpcc-output-analyze (I got it here [URL=“~percona-dev/perconatools/tpcc-mysql : contents of scripts/analyze.sh at revision 48”]http://bazaar.launchpad.net/~percona...pts/analyze.sh[/URL] and modified a bit)
TIMESLOT=1
if [ -n “$2” ]
then
TIMESLOT=$2
echo “Defined $2”
fi
cat $1 | grep -v HY000 | grep -v payment | grep -v neword | awk -v timeslot=$TIMESLOT ’ BEGIN { FS=“[,():]”; s=0; cntr=0; aggr=0 } /MEASURING START/ { s=1} /STOPPING THREADS/ {s=0} /0/ { if (s==1) { cntr++; aggr+=$2; } if ( cntr==timeslot ) { printf (“%d %3d\n”,$1,(aggr/‘$TIMESLOT’)) ; cntr=0; aggr=0 } } ’
==================================================
file: tpcc-graph-build.sh
#!/bin/bash
goto user homedir and remove previous file
cd ~/
rm -f tpcc-graph.jpg
gnuplot << EOP
set data source file
datafile = “tpcc-data.txt”
set graph type and size
set terminal jpeg size 640,480
set grid x y
set xlabel “Time (sec)”
set ylabel “Transactions”
set output “tpcc-graph.jpg”
build graph
plot datafile with lines
plot datafile title “TpmC” with lines
EOP
==================================================
graph is saved to tpcc-graph.jpg file