This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
adding the perf testing scripts to the repo
- Loading branch information
BuzzTroll
committed
Sep 10, 2010
1 parent
687b290
commit ee7a9e1
Showing
6 changed files
with
108 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/python | ||
|
||
|
||
import sys | ||
import string | ||
import random | ||
import os | ||
import sys | ||
import sys | ||
import ConfigParser | ||
from ConfigParser import SafeConfigParser | ||
import time | ||
import tempfile | ||
import traceback | ||
import filecmp | ||
import logging | ||
import shlex | ||
from optparse import SUPPRESS_HELP | ||
import boto | ||
from boto.s3.connection import OrdinaryCallingFormat | ||
from boto.s3.connection import VHostCallingFormat | ||
from boto.s3.connection import SubdomainCallingFormat | ||
from boto.s3.connection import S3Connection | ||
from boto.ec2.connection import EC2Connection | ||
|
||
|
||
def main(argv=sys.argv[1:]): | ||
|
||
host = argv[0] | ||
imagename = argv[1] | ||
count = int(argv[2]) | ||
|
||
print "setting up ec2 connection" | ||
ec2conn = EC2Connection(s3id, pw, host=host, port=8444, debug=2) | ||
ec2conn.host = host | ||
|
||
print "getting a reference to the remote image" | ||
image = ec2conn.get_image(imagename) | ||
print "running %d instances" % (count) | ||
res = image.run(min_count=count, max_count=count) | ||
print "stoping all instances" | ||
res.stop_all() | ||
|
||
return 0 | ||
|
||
if __name__ == "__main__": | ||
rc = main() | ||
sys.exit(rc) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
histdir=`mktemp -d` | ||
cmd="/home/bresnaha/nimbus-cloud-client-016/bin/cloud-client.sh --name lenny-vm.raw --hours .1 --run --history-dir $histdir" | ||
$cmd | ||
rm -rf $histdir | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
tm_file=$1 | ||
cnts="4 8 16 32 64" | ||
trials=4 | ||
|
||
touch $tm_file | ||
for c in $cnts | ||
do | ||
for i in `seq 1 $trials` | ||
do | ||
echo $i | ||
/usr/bin/time --append -o $tm_file --format "$c %e" ./timer.sh $c | ||
sleep 90 | ||
rm -rf /home/bresnaha/nimbus-cloud-client-016/history/* | ||
sleep 90 | ||
done | ||
done | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
cmd="./cmd.sh" | ||
max=$1 | ||
pid_list="" | ||
for i in `seq 1 $max` | ||
do | ||
touch run.log | ||
$cmd | tee -a run.log & | ||
pid_list="$pid_list $!" | ||
done | ||
|
||
wait | ||
|
This file contains 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