#!/bin/sh

COUNT=10
CMD=$*

while [ true ]; do
    export XPCOM_MEM_BLOAT_LOG="bloat-${COUNT}.log"
    $CMD http://localhost/cgi-bin/buster.cgi?last=${COUNT}
    if [ $? -ne 0 ]; then
        exit 1;
    fi
    COUNT=`expr ${COUNT} + 10`
done
