Created
November 23, 2016 14:00
-
-
Save theeye-io/59312b26c30dd91b99cf954643cfc66d to your computer and use it in GitHub Desktop.
checkResponseTime.bat
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 off | |
set url=%1 | |
shift | |
set threshold=%1 | |
shift | |
set datetime=%date:~-4%_%date:~-7,2%_%date:~-10,2%_%time:~0,2%_%time:~3,2%_%time:~6,2% | |
set logname=..\tmp\responseTime%datetime%.txt | |
..\mingw64\bin\curl -o /dev/null -s -w %%{time_total} %url% > %logname% | |
set /p Result=<%logname% | |
del %logname% | |
IF %Result% GEQ %threshold% ( | |
echo High response time %Result%, expected %threshold% | |
echo failure | |
) ELSE ( | |
echo Low response time %Result%, expected %threshold% | |
echo success | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment