def init_event(options):
global eventThread
if (1):
if (options.user):
options.event_mode="user:in %f:out %f" % (
options.pro_in, options.pro_out)
# run event simulate threading
eventThread=runTest.UserDefThread()
# eventThreadx=None
print "****DEBUG:UserDefThread:", eventThread.stats
# raw_input()
if (options.crash):
options.event_mode="accident:in %f:out %f" % (
options.pro_in, options.pro_out)
eventThread=runTest.CrashThread()
print "****DEBUG:CrashThread:", eventThread.stats
if (eventThread):
eventThread.setDaemon(True)
eventThread.setProJoin(options.pro_in)
eventThread.setProLeave(options.pro_out)
eventThread.setInterval(options.interval)
eventThread.setTimeLimit(options.timelimit)
eventThread.ready()
评论列表
文章目录