This file contains 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
#1/bin/bash | |
timestamp=$(date +"%H-%M-%S_%d-%m-%Y") | |
docker exec postgres pg_dump -U gaurish kanboard > ~/dumps/kanboard_dump-$timestamp.sql | |
docker exec davical-postgres pg_dumpall -U gaurish > ~/dumps/davical_dump-$timestamp.sql | |
cd dumps | |
zip -6 -r backup_$timestamp.zip kanboard_dump-$timestamp.sql davical_dump-$timestamp.sql |
This file contains 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
echo "\n\n# Benchmarking Golang" | |
go build main.go | |
./main & | |
PID=$! | |
sleep 2 | |
bombardier --fasthttp -c 100 -n 10000 http://127.0.0.1:8000/ | |
ps -o pid,ppid,pcpu,pmem,command -p $PID | |
# Thread count | |
echo "Threads: $(ps -M $PID | grep -v USER | wc -l)" | |
kill $PID |