#!/bin/bash

ActionLabel=VACUUM
echo; date +"%n%F %T TIMEIT $ActionLabel started."; echo
START_SECS=$(date +"%s")

set -x
vacuumdb -p5433 -j4 --analyze tap_d
set +x

FINISH_SECS=$(date +"%s")
ET=$(echo "scale=2;(${FINISH_SECS} - ${START_SECS})/60" | bc)
date +"%n%F %T TIMEIT $ActionLabel finished. Elapsed time: ${ET} minutes."
