Skip to content

Instantly share code, notes, and snippets.

@jailbirt
Last active October 24, 2016 16:55
Show Gist options
  • Save jailbirt/d102df5f006de9e8f3ff754d6ed5a5e6 to your computer and use it in GitHub Desktop.
Save jailbirt/d102df5f006de9e8f3ff754d6ed5a5e6 to your computer and use it in GitHub Desktop.
theeye-windows-checkResponseTime
echo off
set arg1=%1
set arg2=%2
shift
shift
..\mingw64\bin\curl -o /dev/null -s -w %%{time_total} %arg1% > ..\tmp\responseTime.txt
set /p VAR=<..\tmp\responseTime.txt
IF %VAR% GEQ %arg2% (
echo Response time alto! %VAR%, expected %arg2%
echo failure
) ELSE (
echo Response time bajo! %VAR, expected %arg2%
echo success
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment