Last active
April 19, 2020 08:40
-
-
Save digi0ps/8ce8b9b172705d3d7dcae4d61ced4708 to your computer and use it in GitHub Desktop.
Postgres testing without active connection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
zmodload zsh/datetime | |
start=$EPOCHREALTIME | |
for i in {1..100}; | |
do | |
PGPASSWORD=password psql -U localadmin testing -c "select count(*) from pg_stat_activity;" > /dev/null; | |
done | |
end=$EPOCHREALTIME | |
echo "Elapsed Time: $((end-start))"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment