def Run(benchmark_spec): """Runs act and reports the results.""" vm = benchmark_spec.vms[0] act.RunActPrep(vm) samples = [] def _Run(index): samples.extend(act.RunAct(vm, index)) if FLAGS.act_parallel: vm_util.RunThreaded(_Run, range(len(vm.scratch_disks))) else: samples = act.RunAct(vm) return samples
def Run(benchmark_spec): """Runs act and reports the results.""" vm = benchmark_spec.vms[0] act.RunActPrep(vm) samples = [] run_samples = [] for load in FLAGS.act_load: def _Run(act_load, index): run_samples.extend(act.RunAct(vm, act_load, index)) if FLAGS.act_parallel: args = [((float(load), idx), {}) for idx in range( FLAGS.act_reserved_partitions, len(vm.scratch_disks))] vm_util.RunThreaded(_Run, args) else: run_samples.extend(act.RunAct(vm, float(load))) samples.extend(run_samples) if FLAGS.act_stop_on_complete and act.IsRunComplete(run_samples): break run_samples = [] return samples