Create hotandcold.sh

This commit is contained in:
Torma Kristóf 2019-12-06 23:54:40 +01:00 committed by GitHub
parent 8d6c0e9457
commit 7cb567446e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#! /usr/bin/env bash
kuberhost=10.98.63.121
while true; do
echo -e "Firing"
curl -s --output /dev/null --write-out "%{time_total}\n" --header "Host: helloworld-go.default.example.com" http://$kuberhost/ >> cold-go.csv
curl -s --output /dev/null --write-out "%{time_total}\n" --header "Host: helloworld-go.default.example.com" http://$kuberhost/ >> hot-go.csv
curl -s --output /dev/null --write-out "%{time_total}\n" --header "Host: isprime-py.default.example.com" http://$kuberhost/ >> cold-py.csv
curl -s --output /dev/null --write-out "%{time_total}\n" --header "Host: isprime-py.default.example.com" http://$kuberhost/ >> hot-py.csv
echo -e "Sleeping"
sleep 2m
done