Last active
August 1, 2016 07:37
-
-
Save michaelkuty/742f5bdade9ddc1e85ce67bc93421147 to your computer and use it in GitHub Desktop.
PerfKit Benchmark Stages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
run_tests() { | |
[ -d ./results/$CLOUD/$TEST ] || mkdir -p ./results/$CLOUD/$TEST | |
# run provision and preparation before run | |
echo "Start preparing environemnt for $TEST in the $CLOUD" | |
./pkb.py --zones=dev01 --benchmarks=$TEST --cloud=$CLOUD --image=ubuntu-14-04-x64-1455869035 --openstack_network=tcp-lab-public-mjk --openstack_image_username=root --openstack_image_username=root --run_stage=provision &>> /tmp/perfkit.log | |
RUN_URI="$(tail -1 /tmp/perfkit.log | grep -o '........$')" | |
echo "Environment with --run_uri="$RUN_URI" is ready for package installations" | |
./pkb.py --zones=dev01 --benchmarks=$TEST --cloud=$CLOUD --image=ubuntu-14-04-x64-1455869035 --openstack_network=tcp-lab-public-mjk --openstack_image_username=root --openstack_image_username=root --run_stage=prepare --run_uri=$RUN_URI | |
BACKUPDIR=$(ls -t /tmp/perfkitbenchmarker/runs/ | head -1) | |
#cp /tmp/perfkitbenchmarker/runs/$BACKUPDIR/$TEST"0" /tmp/backup.pickle | |
echo "Environment with --run_uri="$RUN_URI" is ready for benchmarking" | |
#sleep 5 | |
echo "Start "$ITERATIONS" number of iterations..." | |
for i in $(eval echo "{1..$ITERATIONS}"); do | |
echo "Start "$i". iteration" | |
./pkb.py --zones=dev01 --benchmarks=$TEST --cloud=$CLOUD --image=ubuntu-14-04-x64-1455869035 --openstack_network=tcp-lab-public-mjk --openstack_image_username=root --openstack_image_username=root --run_stage=run --run_uri=$RUN_URI | |
sleep 10 | |
#cp /tmp/backup.pickle /tmp/perfkitbenchmarker/runs/$BACKUPDIR/$TEST"0" | |
done | |
# backup results | |
cp -r /tmp/perfkitbenchmarker/* ./results/$CLOUD/$TEST | |
rm -rf /tmp/perfkitbenchmarker | |
# teardown | |
./pkb.py --zones=dev01 --benchmarks=$TEST --cloud=$CLOUD --image=ubuntu-14-04-x64-1455869035 --openstack_network=tcp-lab-public-mjk --openstack_image_username=root --openstack_image_username=root --run_stage=teardown --run_uri=$RUN_URI | |
} | |
ITERATIONS=5 | |
CLOUD="OpenStack" | |
run_tests $ITERATIONS "iperf" $CLOUD | |
#run_tests $ITERATIONS "ping" $CLOUD | |
#ren_tests $ITERATIONS "netperf" $CLOUD | |
#run_tests $ITERATIONS "iperf" "OpenStack" | |
#run_tests $ITERATIONS "coremark" $CLOUD | |
#run_tests $ITERATIONS "copy_throughput" $CLOUD | |
#run_tests $ITERATIONS "unixbench" $CLOUD | |
#run_tests $ITERATIONS "aerospike" $CLOUD | |
#run_tests $ITERATIONS "fio" $CLOUD | |
#run_tests $ITERATIONS "mesh_network" $CLOUD | |
#run_tests $ITERATIONS "cassandra_stress" $CLOUD | |
#run_tests $ITERATIONS "mongodb_ycsb" $CLOUD | |
#run_tests $ITERATIONS "hadoop_terasort" $CLOUD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment