Changeset 8690 for main/waeup.stress/trunk/src/waeup/stress
- Timestamp:
- 12 Jun 2012, 10:14:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.stress/trunk/src/waeup/stress/__init__.py
r8689 r8690 4 4 import sys 5 5 import time 6 #import waeup.kofa7 6 8 AVAILABLE_KOFA_PROJECTS = ['waeup.kofa',]9 7 packages = dict() 10 kofa_projects = dict()11 8 12 9 root = os.path.dirname(os.path.dirname(os.path.dirname( … … 29 26 30 27 print "WAEUP.STRESS.INIT: INSTANCES: ", instances 31 32 def do_foo():33 mydir = os.path.dirname(os.path.dirname(__file__))34 print "MYDIR", mydir35 #import pdb; pdb.set_trace()36 28 37 29 def enable_datafs(path, proj_name): … … 86 78 path = instances[name] 87 79 print "WAEUP.STRESS: starting instance %s at %s using %s" % ( 88 name, path, mode) ,80 name, path, mode) 89 81 old_cwd_ = os.getcwd() 90 82 os.chdir(path) … … 106 98 def wait_for_startup(host, port): 107 99 """Wait until a connection to host and port can be made. 100 101 After a timeout of 10 secs we abort raising an IOError. 108 102 """ 103 print "WAEUP.STRESS.INIT: waiting for instance(s) to come up on %s:%s" % ( 104 host, port) 109 105 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 106 start = time.time() 110 107 while True: 108 if time.time() - 10 > start: 109 raise IOError('timeout while waiting for instance to come up') 111 110 try: 112 111 s.connect((host, port)) … … 115 114 time.sleep(0.1) 116 115 s.close() 116 print "WAEUP.STRESS.INIT: instance(s) up after %.2f secs" % ( 117 time.time() - start,) 117 118 return 118 119 … … 156 157 './bin/python-console %s' % script, shell=True) 157 158 os.chdir(old_cwd_) 158 159 def configure():160 import ConfigParser161 from multimechanize.utilities.run import project_name, cmd_opts, args162 print "Configure"163 print "PROJECT NAME: ", project_name
Note: See TracChangeset for help on using the changeset viewer.