Last active
April 14, 2023 18:57
-
-
Save pavelmash/347bd79c297eb5eb41f30d7c2d504f18 to your computer and use it in GitHub Desktop.
Run the same as TechEmpower test, but from console - for smoke testing
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
#!/usr/bin/bash | |
# Do the same as TechEmpower test, but from console - for smoke testing | |
# CORES2USE is cores, used by wrk, CORES2USE_COUNT should be equal to used cores count | |
# recommented method to run is. | |
# ./tfb-smoke.sh "server_config_namee" | tee -a results.txt | |
CORES2USE=6-11 | |
CORES2USE_COUNT=6 | |
# wrk connections count. TFB uses up to 512 | |
CONN="-c 128" | |
HOST="http://localhost:8080" | |
PARAMS="--latency -d 10 --timeout 8 -t $CORES2USE_COUNT" | |
set -o pipefail | |
# uncomment below to see actual commands | |
#set -x | |
perform() { | |
URL="$1" | |
printf "%-21s" "$URL" | |
RPS=`LD_LIBRARY_PATH=. taskset -c $CORES2USE wrk $PARAMS -H 'Host: 10.0.0.1' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' - | |
printf "%'12i\n" `echo "scale=0; $RPS/1" | bc` | |
sleep 3s | |
} | |
echo "" | |
echo "Tests for: $1; $(date)" | |
perform "json" | |
#callgrind_control -i on | |
perform "rawdb" | |
#callgrind_control -i off | |
perform "rawfortunes" | |
perform "rawqueries?queries=20" | |
perform "cached-queries?count=100" | |
perform "db" | |
perform "queries?queries=20" | |
perform "updates?queries=20" | |
perform "fortunes" | |
CONN="" | |
#pipelined plaintext | |
perform "plaintext" "-c 1024 -s pipeline.lua -- 16" | |
#plaintext w/o pipelining | |
perform "plaintext" "-c 1024" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment