示例#1
0
 def run_one(num):
     start = time.time()
     benchcontext = copy.copy(config.get('radosbench'))
     iterations = 0
     while time.time() - start < int(config.get('time', 600)):
         log.info("Starting iteration %s of segment %s"%(iterations, num))
         benchcontext['pool'] = str(num) + "-" + str(iterations)
         with radosbench.task(ctx, benchcontext):
             time.sleep()
         iterations += 1
示例#2
0
 def run_one(num):
     """Run test spawn from gevent"""
     start = time.time()
     benchcontext = copy.copy(config.get('radosbench'))
     iterations = 0
     while time.time() - start < int(config.get('time', 600)):
         log.info("Starting iteration %s of segment %s"%(iterations, num))
         benchcontext['pool'] = str(num) + "-" + str(iterations)
         with radosbench.task(ctx, benchcontext):
             time.sleep()
         iterations += 1