diff --git a/jmeter/run.sh b/jmeter/run.sh index 6646e26..3f3f728 100755 --- a/jmeter/run.sh +++ b/jmeter/run.sh @@ -3,7 +3,16 @@ set -e # Do not continue if jmeter fails : ${JMETER:=jmeter} -HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" +export HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" date="$(date +%F-%H-%M-%S)" -JVM_ARGS="-Djmeter.reportgenerator.report_title=Telegram-Token-Performance-Test" -$JMETER -n -t telegram-token.jmx -l "results-$date.csv" -e -o "report-$date" + +for scenario in GetHomePage GetAlbum GetMedia GetRawVideo GetRawPhoto; do + echo + echo "================================================================================" + echo "Running scenario $scenario..." + echo "================================================================================" + echo + export JVM_ARGS="-Djmeter.reportgenerator.report_title=$scenario" + $JMETER -n -t telegram-token.jmx -l "results-$date-$scenario.csv" -e -o "report-$date-$scenario" -Jscenario=$scenario + sleep 2 +done diff --git a/jmeter/telegram-token.jmx b/jmeter/telegram-token.jmx index d8b164b..dd8d063 100644 --- a/jmeter/telegram-token.jmx +++ b/jmeter/telegram-token.jmx @@ -34,6 +34,31 @@ nmasse_itix = + + album_name + 2020-04-04-9-mois + = + + + media_id + 953b1e98-de30-4ae0-97b4-cb82f6e487ac + = + + + raw_photo_filename + 65e4b775-bc64-4f58-a4d2-4dd109ee303f.jpeg + = + + + raw_video_filename + 953b1e98-de30-4ae0-97b4-cb82f6e487ac.mp4 + = + + + scenario + ${__P(scenario,GetHomePage)} + = + @@ -59,26 +84,147 @@ -1 - - - - - ${server_hostname} - ${server_port} - http - - /s/${telegram_username}/${telegram_token}/album/ - GET - true - false - true - false - - HttpClient4 - - - + + false + true + false + + + ${__jexl3("${scenario}" == "GetHomePage",)} + false + true + + + + + + + ${server_hostname} + ${server_port} + http + + /s/${telegram_username}/${telegram_token}/album/ + GET + true + false + true + false + + HttpClient4 + + + + + + + ${__jexl3("${scenario}" == "GetAlbum",)} + false + true + + + + + + + ${server_hostname} + ${server_port} + http + + /s/${telegram_username}/${telegram_token}/album/${album_name}/ + GET + true + false + true + false + + HttpClient4 + + + + + + + ${__jexl3("${scenario}" == "GetMedia",)} + false + true + + + + + + + ${server_hostname} + ${server_port} + http + + /s/${telegram_username}/${telegram_token}/album/${album_name}/media/${media_id}/ + GET + true + false + true + false + + HttpClient4 + + + + + + + ${__jexl3("${scenario}" == "GetRawVideo",)} + false + true + + + + + + + ${server_hostname} + ${server_port} + http + + /s/${telegram_username}/${telegram_token}/album/${album_name}/raw/${raw_video_filename} + GET + true + false + true + false + + HttpClient4 + + + + + + + ${__jexl3("${scenario}" == "GetRawPhoto",)} + false + true + + + + + + + ${server_hostname} + ${server_port} + http + + /s/${telegram_username}/${telegram_token}/album/${album_name}/raw/${raw_photo_filename} + GET + true + false + true + false + + HttpClient4 + + + + +