Skip to content

Instantly share code, notes, and snippets.

@maciejwalkowiak
Last active October 28, 2022 12:24
Show Gist options
  • Save maciejwalkowiak/e54f8e41948b83752ff710a80581d3cd to your computer and use it in GitHub Desktop.
Save maciejwalkowiak/e54f8e41948b83752ff710a80581d3cd to your computer and use it in GitHub Desktop.
START=$(date +%s.%N)
while [ "$(curl -s -o /dev/null -L -w ''%{http_code}'' http://localhost:8080/hello)" != "200" ];
do sleep 0.001;
done
END=$(date +%s.%N)
DIFF=$(echo "($END - $START) * 1000" | bc)
echo "Measured"
echo $DIFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment