Skip to content

Instantly share code, notes, and snippets.

@kshitij10496
Created July 11, 2019 08:17
Show Gist options
  • Save kshitij10496/76d6f24d9a0b27e10d7a55e507a1d7c5 to your computer and use it in GitHub Desktop.
Save kshitij10496/76d6f24d9a0b27e10d7a55e507a1d7c5 to your computer and use it in GitHub Desktop.
Bash Script for sending traffic to diffy instance for the example Docker image.
#!/usr/bin/env bash
echo "Send some traffic to your Diffy instance"
declare -a endpoints=("success" "noise" "regression" "noisy_regression")
declare -a values=("mixpanel" "twitter" "airbnb" "paytm" "baidu")
for i in {1..10}
do
for k in "${endpoints[@]}"
do
for v in "${values[@]}"
do
sleep 0.1
curl -s -i -H "Canonical-Resource : endpoint-$k" http://localhost:8880/$k?value=$v > /dev/null
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment