add redis caching, closes #3. More logs, closes #9

This commit is contained in:
jomo
2014-11-02 04:12:00 +01:00
parent d2a5b3d42e
commit da8ba52717
9 changed files with 151 additions and 49 deletions

View File

@@ -4,5 +4,9 @@ rm -f "$dir/../skins/"*.png || exit 1
for uuid in `cat "$dir/uuids.txt"`; do
uuid=`echo "$uuid" | tr -d '\r'`
size=$(( ((RANDOM<<15)|RANDOM) % 514 - 1 )) # random number from -1 to 513
curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://127.0.0.1:3000/avatars/$uuid/$size"
helm=""
if [ "$(( ((RANDOM<<15)|RANDOM) % 2 ))" -eq "1" ]; then
helm="&helm"
fi
curl -sS -o /dev/null -w "%{url_effective} %{http_code} %{time_total}s\\n" "http://127.0.0.1:3000/avatars/$uuid?size=$size$helm" || exit 1
done