1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-17 09:41:06 +03:00
Files
mariadb-columnstore-engine/mysql/queries/nightly/demo/test502/getsummary.sh
2016-01-06 14:08:59 -06:00

57 lines
894 B
Bash
Executable File

#!/bin/sh
#
# Script to generate a file with the overall results.
#
# Show DDL/DML status.
grep -r "Total Seconds = " 20*/mtim* |
awk '
{
count++;
val[count]=$4;
}END{
if(count > 1 && val[count-1] > 0)
factor=val[count]/val[count-1];
else
factor = 1;
if(count > 1)
{
if(val[count-1] > 0)
x=-(1-(val[count]/val[count-1])) * 100;
else
x=0;
plus=x>0?"+":"";
print "Total DDL/DML Time : " val[count] " seconds (" plus x "%)";
}
}'
# Show DML/DDL diff results.
cat mdiff.results
echo ""
# Show DML/DDL times.
echo "";
echo "DDL/DML Time In Seconds";
echo "---------------------------------------";
grep -r "Total Seconds = " 20*/mtim* |
awk '
{
count++;
val[count]=$4;
if(count==1)
{
print $1 " " $4;
}
else
{
if(val[count-1] > 0)
x=-(1-(val[count]/val[count-1])) * 100;
else
x=0;
plus=x>0?"+":"";
print $1 " " $4 " (" plus x "%)";
}
}'