Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 33e9c85

Browse files
dmiusDmitry
authored andcommitted
Optimize verbosity
1 parent 5fc5178 commit 33e9c85

File tree

1 file changed

+88
-65
lines changed

1 file changed

+88
-65
lines changed

nancy_run.sh

Lines changed: 88 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CURRENT_TS=$(date +%Y%m%d_%H%M%S%N_%Z)
55
DOCKER_MACHINE="nancy-$CURRENT_TS"
66
DOCKER_MACHINE="${DOCKER_MACHINE//_/-}"
77
DEBUG_TIMEOUT=0
8+
OUTPUT_REDIRECT=" > /dev/null"
89
EBS_SIZE_MULTIPLIER=15
910

1011
## Get command line params
@@ -180,7 +181,10 @@ while true; do
180181
181182
" | less -RFX
182183
exit ;;
183-
-d | --debug ) DEBUG=1; shift ;;
184+
-d | --debug )
185+
DEBUG=1;
186+
OUTPUT_REDIRECT='';
187+
shift ;;
184188
--run-on )
185189
RUN_ON="$2"; shift 2 ;;
186190
--container-id )
@@ -538,7 +542,7 @@ checkParams;
538542
# Determine dump file size
539543
if ([ "$RUN_ON" == "aws" ] && [ ! ${AWS_EC2_TYPE:0:2} == "i3" ] && \
540544
[ -z ${EBS_VOLUME_SIZE+x} ] && [ ! -z ${DB_DUMP_PATH+x} ]); then
541-
echo "Calculate EBS volume size."
545+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Calculate EBS volume size."
542546
dumpFileSize=0
543547
if [[ $DB_DUMP_PATH =~ "s3://" ]]; then
544548
dumpFileSize=$(s3cmd info $DB_DUMP_PATH | grep "File size:" )
@@ -557,9 +561,9 @@ if ([ "$RUN_ON" == "aws" ] && [ ! ${AWS_EC2_TYPE:0:2} == "i3" ] && \
557561
let ebsSize=$dumpFileSize
558562
ebsSize=$(numfmt --to-unit=G $ebsSize)
559563
EBS_VOLUME_SIZE=$ebsSize
560-
[ $DEBUG -eq 1 ] && echo "EBS volume size: $EBS_VOLUME_SIZE Gb"
564+
[ $DEBUG -eq 1 ] && echo "$(date "+%Y-%m-%d %H:%M:%S"): EBS volume size: $EBS_VOLUME_SIZE Gb"
561565
else
562-
echo "EBS volume is not require."
566+
echo "$(date "+%Y-%m-%d %H:%M:%S"): EBS volume is not require."
563567
fi
564568
fi
565569

@@ -601,15 +605,15 @@ function waitEC2Ready() {
601605
# 5) key pair name
602606
# 6) key path
603607
function createDockerMachine() {
604-
echo "Attempt to create a docker machine..."
608+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Attempt to create a docker machine..."
605609
docker-machine create --driver=amazonec2 \
606610
--amazonec2-request-spot-instance \
607611
--amazonec2-keypair-name="$5" \
608612
--amazonec2-ssh-keypath="$6" \
609-
--amazonec2-block-duration-minutes=$4 \
610613
--amazonec2-instance-type=$2 \
611614
--amazonec2-spot-price=$3 \
612615
$1 2> >(grep -v "failed waiting for successful resource state" >&2) &
616+
# --amazonec2-block-duration-minutes=$4 \
613617
}
614618

615619
function destroyDockerMachine() {
@@ -622,11 +626,17 @@ function destroyDockerMachine() {
622626
# when we have "price-too-low" attempts, such errors come in few minutes
623627
# after an attempt and are generally unexpected by user.
624628
cmdout=$(docker-machine rm --force $1 2> >(grep -v "unknown instance" >&2) )
625-
echo "Termination requested for machine '$1', current status: $cmdout"
629+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Termination requested for machine, current status: $cmdout"
626630
}
627631

628632
function cleanupAndExit {
629-
echo "Remove temp files..." # if exists
633+
if [ "$DEBUG_TIMEOUT" -gt "0" ]; then
634+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Debug timeout is $DEBUG_TIMEOUT seconds - started."
635+
echo " To connect docker machine use:"
636+
echo " docker \`docker-machine config $DOCKER_MACHINE\` exec -it pg_nancy_${CURRENT_TS} bash"
637+
sleep $DEBUG_TIMEOUT
638+
fi
639+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Remove temp files..." # if exists
630640
docker $dockerConfig exec -i ${containerHash} sh -c "sudo rm -rf $MACHINE_HOME"
631641
rm -f "$TMP_PATH/after_db_init_code_tmp.sql"
632642
rm -f "$TMP_PATH/before_db_init_code_tmp.sql"
@@ -636,16 +646,16 @@ function cleanupAndExit {
636646
rm -f "$TMP_PATH/target_config_tmp.conf"
637647
rm -f "$TMP_PATH/pg_config_tmp.conf"
638648
if [ "$RUN_ON" = "localhost" ]; then
639-
echo "Remove docker container"
649+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Remove docker container"
640650
docker container rm -f $containerHash
641651
elif [ "$RUN_ON" = "aws" ]; then
642652
destroyDockerMachine $DOCKER_MACHINE
643653
if [ ! -z ${VOLUME_ID+x} ]; then
644-
echo "Wait and delete volume $VOLUME_ID"
654+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Wait and delete volume $VOLUME_ID"
645655
sleep 60 # wait to machine removed
646656
delvolout=$(aws ec2 delete-volume --volume-id $VOLUME_ID)
647-
echo "Volume $VOLUME_ID deleted"
648-
fi
657+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Volume $VOLUME_ID deleted"
658+
fi
649659
else
650660
>&2 echo "ASSERT: must not reach this point"
651661
exit 1
@@ -675,18 +685,18 @@ elif [[ "$RUN_ON" = "aws" ]]; then
675685
maxprice=$(echo $prices | jq 'max_by(.price) | .price')
676686
maxprice="${maxprice/\"/}"
677687
maxprice="${maxprice/\"/}"
678-
echo "Max price from history: $maxprice"
688+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Max price from history: $maxprice"
679689
multiplier="1.1"
680690
price=$(echo "$maxprice * $multiplier" | bc -l)
681-
echo "Increased price: $price"
691+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Increased price: $price"
682692
EC2_PRICE=$price
683693

684694
createDockerMachine $DOCKER_MACHINE $AWS_EC2_TYPE $EC2_PRICE \
685695
60 $AWS_KEY_PAIR $AWS_KEY_PATH;
686696
status=$(waitEC2Ready "docker-machine create" "$DOCKER_MACHINE" 1)
687697
if [ "$status" == "price-too-low" ]
688698
then
689-
echo "Price $price is too low for $AWS_EC2_TYPE instance. Getting the up-to-date value from the error message..."
699+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Price $price is too low for $AWS_EC2_TYPE instance. Getting the up-to-date value from the error message..."
690700

691701
#destroyDockerMachine $DOCKER_MACHINE
692702
# "docker-machine rm" doesn't work for "price-too-low" spot requests,
@@ -710,31 +720,31 @@ elif [[ "$RUN_ON" = "aws" ]]; then
710720
DOCKER_MACHINE="nancy-$CURRENT_TS"
711721
DOCKER_MACHINE="${DOCKER_MACHINE//_/-}"
712722
#try start docker machine name with new price
713-
echo "Attempt to create a new docker machine: $DOCKER_MACHINE with price: $EC2_PRICE."
723+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Attempt to create a new docker machine: $DOCKER_MACHINE with price: $EC2_PRICE."
714724
createDockerMachine $DOCKER_MACHINE $AWS_EC2_TYPE $EC2_PRICE \
715725
60 $AWS_KEY_PAIR $AWS_KEY_PATH;
716726
waitEC2Ready "docker-machine create" "$DOCKER_MACHINE" 0;
717727
else
718-
>&2 echo "ERROR: Cannot determine actual price for the instance $AWS_EC2_TYPE."
728+
>&2 echo "$(date "+%Y-%m-%d %H:%M:%S") ERROR: Cannot determine actual price for the instance $AWS_EC2_TYPE."
719729
exit 1;
720730
fi
721731
fi
722732

723-
echo "Check a docker machine status."
733+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Check a docker machine status."
724734
res=$(docker-machine status $DOCKER_MACHINE 2>&1 &)
725735
if [ "$res" != "Running" ]
726736
then
727-
>&2 echo "Failed: Docker $DOCKER_MACHINE is NOT running."
737+
>&2 echo "$(date "+%Y-%m-%d %H:%M:%S"): Failed: Docker $DOCKER_MACHINE is NOT running."
728738
exit 1;
729739
fi
730-
echo "Docker $DOCKER_MACHINE is running."
740+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Docker $DOCKER_MACHINE is running."
731741

732742
docker-machine ssh $DOCKER_MACHINE "sudo sh -c \"mkdir /home/storage\""
733743
if [ ${AWS_EC2_TYPE:0:2} == 'i3' ]
734744
then
735-
echo "Attempt use high speed disk"
745+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Attempt use high speed disk"
736746
# Init i3 storage, just mount existing volume
737-
echo "Attach i3 nvme volume"
747+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Attach i3 nvme volume"
738748
docker-machine ssh $DOCKER_MACHINE sudo add-apt-repository -y ppa:sbates
739749
docker-machine ssh $DOCKER_MACHINE sudo apt-get update || :
740750
docker-machine ssh $DOCKER_MACHINE sudo apt-get install -y nvme-cli
@@ -750,11 +760,11 @@ elif [[ "$RUN_ON" = "aws" ]]; then
750760
docker-machine ssh $DOCKER_MACHINE sudo mkfs -t ext4 /dev/nvme0n1p1
751761
docker-machine ssh $DOCKER_MACHINE sudo mount /dev/nvme0n1p1 /home/storage
752762
else
753-
echo "Attempt use external disk"
763+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Attempt use external disk"
754764
# Create new volume and attach them for non i3 instances if needed
755765
if [ ! -z ${EBS_VOLUME_SIZE+x} ]; then
756-
echo "Create and attach EBS volume"
757-
[ $DEBUG -eq 1 ] && echo "Create volume with size: $EBS_VOLUME_SIZE Gb"
766+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Create and attach EBS volume"
767+
[ $DEBUG -eq 1 ] && echo "$(date "+%Y-%m-%d %H:%M:%S"): Create volume with size: $EBS_VOLUME_SIZE Gb"
758768
VOLUME_ID=$(aws ec2 create-volume --size $EBS_VOLUME_SIZE --region us-east-1 --availability-zone us-east-1a --volume-type gp2 | jq -r .VolumeId)
759769
INSTANCE_ID=$(docker-machine ssh $DOCKER_MACHINE curl -s http://169.254.169.254/latest/meta-data/instance-id)
760770
sleep 10 # wait to volume will ready
@@ -786,7 +796,7 @@ if [[ "$RUN_ON" = "aws" ]]; then
786796
MACHINE_HOME="$MACHINE_HOME/storage"
787797
docker_exec sh -c "chmod a+w /storage"
788798

789-
echo "Move posgresql to separated disk"
799+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Move posgresql to separated disk"
790800
docker_exec bash -c "sudo /etc/init.d/postgresql stop"
791801
sleep 2 # wait for postgres stopped
792802
docker_exec bash -c "sudo mv /var/lib/postgresql /storage/"
@@ -828,41 +838,42 @@ function copyFile() {
828838
# Dump
829839
sleep 2 # wait for postgres up&running
830840

831-
echo "Apply sql code before db init"
841+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply sql code before db init"
832842
if ([ ! -z ${BEFORE_DB_INIT_CODE+x} ] && [ "$BEFORE_DB_INIT_CODE" != "" ])
833843
then
834844
BEFORE_DB_INIT_CODE_FILENAME=$(basename $BEFORE_DB_INIT_CODE)
835845
copyFile $BEFORE_DB_INIT_CODE
836-
docker_exec bash -c "psql --set ON_ERROR_STOP=on -U postgres test -b -f $MACHINE_HOME/$BEFORE_DB_INIT_CODE_FILENAME"
846+
# --set ON_ERROR_STOP=on
847+
docker_exec bash -c "psql --set ON_ERROR_STOP=on -U postgres test -b -f $MACHINE_HOME/$BEFORE_DB_INIT_CODE_FILENAME $OUTPUT_REDIRECT"
837848
fi
838-
echo "Restore database dump"
849+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Restore database dump"
839850
case "$DB_DUMP_EXT" in
840851
sql)
841-
docker_exec bash -c "cat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test"
852+
docker_exec bash -c "cat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test $OUTPUT_REDIRECT"
842853
;;
843854
bz2)
844-
docker_exec bash -c "bzcat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test"
855+
docker_exec bash -c "bzcat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test $OUTPUT_REDIRECT"
845856
;;
846857
gz)
847-
docker_exec bash -c "zcat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test"
858+
docker_exec bash -c "zcat $MACHINE_HOME/$DB_DUMP_FILENAME | psql --set ON_ERROR_STOP=on -U postgres test $OUTPUT_REDIRECT"
848859
;;
849860
esac
850861
# After init database sql code apply
851-
echo "Apply sql code after db init"
862+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply sql code after db init"
852863
if ([ ! -z ${AFTER_DB_INIT_CODE+x} ] && [ "$AFTER_DB_INIT_CODE" != "" ])
853864
then
854865
AFTER_DB_INIT_CODE_FILENAME=$(basename $AFTER_DB_INIT_CODE)
855866
copyFile $AFTER_DB_INIT_CODE
856-
docker_exec bash -c "psql -U postgres test -b -f $MACHINE_HOME/$AFTER_DB_INIT_CODE_FILENAME"
867+
docker_exec bash -c "psql --set ON_ERROR_STOP=on -U postgres test -b -f $MACHINE_HOME/$AFTER_DB_INIT_CODE_FILENAME $OUTPUT_REDIRECT"
857868
fi
858869
# Apply DDL code
859-
echo "Apply DDL SQL code"
870+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply DDL SQL code"
860871
if ([ ! -z ${TARGET_DDL_DO+x} ] && [ "$TARGET_DDL_DO" != "" ]); then
861872
TARGET_DDL_DO_FILENAME=$(basename $TARGET_DDL_DO)
862-
docker_exec bash -c "psql -U postgres test -b -f $MACHINE_HOME/$TARGET_DDL_DO_FILENAME"
873+
docker_exec bash -c "psql --set ON_ERROR_STOP=on -U postgres test -b -f $MACHINE_HOME/$TARGET_DDL_DO_FILENAME $OUTPUT_REDIRECT"
863874
fi
864875
# Apply initial postgres configuration
865-
echo "Apply initial postgres configuration"
876+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply initial postgres configuration"
866877
if ([ ! -z ${PG_CONFIG+x} ] && [ "$PG_CONFIG" != "" ]); then
867878
PG_CONFIG_FILENAME=$(basename $PG_CONFIG)
868879
docker_exec bash -c "cat $MACHINE_HOME/$PG_CONFIG_FILENAME >> /etc/postgresql/$PG_VERSION/main/postgresql.conf"
@@ -872,46 +883,62 @@ if ([ ! -z ${PG_CONFIG+x} ] && [ "$PG_CONFIG" != "" ]); then
872883
fi
873884
fi
874885
# Apply postgres configuration
875-
echo "Apply postgres configuration"
886+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply postgres configuration"
876887
if ([ ! -z ${TARGET_CONFIG+x} ] && [ "$TARGET_CONFIG" != "" ]); then
877888
TARGET_CONFIG_FILENAME=$(basename $TARGET_CONFIG)
878889
docker_exec bash -c "cat $MACHINE_HOME/$TARGET_CONFIG_FILENAME >> /etc/postgresql/$PG_VERSION/main/postgresql.conf"
879890
docker_exec bash -c "sudo /etc/init.d/postgresql restart"
880891
fi
892+
#Save before workload log
893+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Save prepaparation log"
894+
logpath=$( \
895+
docker_exec bash -c "psql -XtU postgres \
896+
-c \"select string_agg(setting, '/' order by name) from pg_settings where name in ('log_directory', 'log_filename');\" \
897+
| grep / | sed -e 's/^[ \t]*//'"
898+
)
899+
docker_exec bash -c "gzip -c $logpath > $MACHINE_HOME/$ARTIFACTS_FILENAME.prepare.log.gz"
900+
if [[ $ARTIFACTS_DESTINATION =~ "s3://" ]]; then
901+
docker_exec s3cmd put /$MACHINE_HOME/$ARTIFACTS_FILENAME.prepare.log.gz $ARTIFACTS_DESTINATION/
902+
else
903+
if [ "$RUN_ON" = "localhost" ]; then
904+
docker cp $containerHash:$MACHINE_HOME/$ARTIFACTS_FILENAME.prepare.log.gz $ARTIFACTS_DESTINATION/
905+
elif [ "$RUN_ON" = "aws" ]; then
906+
docker-machine scp $DOCKER_MACHINE:/home/storage/$ARTIFACTS_FILENAME.prepare.log.gz $ARTIFACTS_DESTINATION/
907+
else
908+
>&2 echo "ASSERT: must not reach this point"
909+
exit 1
910+
fi
911+
fi
912+
881913
# Clear statistics and log
882-
echo "Execute vacuumdb..."
914+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Execute vacuumdb..."
883915
docker_exec vacuumdb -U postgres test -j $(cat /proc/cpuinfo | grep processor | wc -l) --analyze
884916
docker_exec bash -c "echo '' > /var/log/postgresql/postgresql-$PG_VERSION-main.log"
885917
# Execute workload
886-
echo "Execute workload..."
918+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Execute workload..."
887919
if [ ! -z ${WORKLOAD_REAL+x} ] && [ "$WORKLOAD_REAL" != '' ];then
888-
echo "Execute pgreplay queries..."
920+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Execute pgreplay queries..."
889921
docker_exec psql -U postgres test -c 'create role testuser superuser login;'
890922
WORKLOAD_FILE_NAME=$(basename $WORKLOAD_REAL)
891923
docker_exec bash -c "pgreplay -r -j $MACHINE_HOME/$WORKLOAD_FILE_NAME"
892924
else
893925
if ([ ! -z ${WORKLOAD_CUSTOM_SQL+x} ] && [ "$WORKLOAD_CUSTOM_SQL" != "" ]); then
894926
WORKLOAD_CUSTOM_FILENAME=$(basename $WORKLOAD_CUSTOM_SQL)
895-
echo "Execute custom sql queries..."
896-
docker_exec bash -c "psql -U postgres test -E -f $MACHINE_HOME/$WORKLOAD_CUSTOM_FILENAME"
927+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Execute custom sql queries..."
928+
docker_exec bash -c "psql -U postgres test -E -f $MACHINE_HOME/$WORKLOAD_CUSTOM_FILENAME $OUTPUT_REDIRECT"
897929
fi
898930
fi
899931

900932
## Get statistics
901-
echo "Prepare JSON log..."
933+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Prepare JSON log..."
902934
docker_exec bash -c "/root/pgbadger/pgbadger \
903935
-j $(cat /proc/cpuinfo | grep processor | wc -l) \
904936
--prefix '%t [%p]: [%l-1] db=%d,user=%u (%a,%h)' /var/log/postgresql/* -f stderr \
905937
-o $MACHINE_HOME/$ARTIFACTS_FILENAME.json"
906938
#2> >(grep -v "install the Text::CSV_XS" >&2)
907939

908-
logpath=$( \
909-
docker_exec bash -c "psql -XtU postgres \
910-
-c \"select string_agg(setting, '/' order by name) from pg_settings where name in ('log_directory', 'log_filename');\" \
911-
| grep / | sed -e 's/^[ \t]*//'"
912-
)
913940
docker_exec bash -c "gzip -c $logpath > $MACHINE_HOME/$ARTIFACTS_FILENAME.log.gz"
914-
echo "Save artifcats..."
941+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Save artifcats..."
915942
if [[ $ARTIFACTS_DESTINATION =~ "s3://" ]]; then
916943
docker_exec s3cmd put /$MACHINE_HOME/$ARTIFACTS_FILENAME.json $ARTIFACTS_DESTINATION/
917944
docker_exec s3cmd put /$MACHINE_HOME/$ARTIFACTS_FILENAME.log.gz $ARTIFACTS_DESTINATION/
@@ -931,23 +958,19 @@ else
931958
fi
932959
fi
933960

934-
echo "Apply DDL undo SQL code"
961+
echo "$(date "+%Y-%m-%d %H:%M:%S"): Apply DDL undo SQL code"
935962
if ([ ! -z ${TARGET_DDL_UNDO+x} ] && [ "$TARGET_DDL_UNDO" != "" ]); then
936963
TARGET_DDL_UNDO_FILENAME=$(basename $TARGET_DDL_UNDO)
937-
docker_exec bash -c "psql -U postgres test -b -f $MACHINE_HOME/$TARGET_DDL_UNDO_FILENAME"
964+
docker_exec bash -c "psql --set ON_ERROR_STOP=on -U postgres test -b -f $MACHINE_HOME/$TARGET_DDL_UNDO_FILENAME $OUTPUT_REDIRECT"
938965
fi
939966

940-
echo -e "Run done!"
941-
echo -e "Report: $ARTIFACTS_DESTINATION/$ARTIFACTS_FILENAME.json"
942-
echo -e "Query log: $ARTIFACTS_DESTINATION/$ARTIFACTS_FILENAME.log.gz"
967+
echo -e "$(date "+%Y-%m-%d %H:%M:%S"): Run done!"
968+
echo -e " Report: $ARTIFACTS_DESTINATION/$ARTIFACTS_FILENAME.json"
969+
echo -e " Query log: $ARTIFACTS_DESTINATION/$ARTIFACTS_FILENAME.log.gz"
970+
echo -e " -------------------------------------------"
971+
echo -e " Summary:"
972+
echo -e " Queries duration:\t\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.queries_duration') " ms"
973+
echo -e " Queries count:\t\t" $( docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.queries_number')
974+
echo -e " Normalized queries count:\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.normalyzed_info| length')
975+
echo -e " Errors count:\t\t\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.errors_number')
943976
echo -e "-------------------------------------------"
944-
echo -e "Summary:"
945-
echo -e " Queries duration:\t\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.queries_duration') " ms"
946-
echo -e " Queries count:\t\t" $( docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.queries_number')
947-
echo -e " Normalized queries count:\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.normalyzed_info| length')
948-
echo -e " Errors count:\t\t\t" $(docker_exec cat /$MACHINE_HOME/$ARTIFACTS_FILENAME.json | jq '.overall_stat.errors_number')
949-
echo -e "-------------------------------------------"
950-
951-
sleep $DEBUG_TIMEOUT
952-
953-
echo Bye!

0 commit comments

Comments
 (0)