Changes in benchmark/rmit.py [dbb1073:7a2a3af]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/rmit.py
rdbb1073 r7a2a3af 10 10 11 11 import argparse 12 import datetime13 12 import itertools 14 13 import os … … 102 101 return nopts 103 102 104 def actions_eta(actions):105 time = 0106 for a in actions:107 i = 0108 while i < len(a):109 if a[i] == '-d':110 i += 1111 if i != len(a):112 time += int(a[i])113 i += 1114 return time115 116 103 if __name__ == "__main__": 117 104 # ================================================================================ … … 173 160 # ================================================================================ 174 161 # Prepare to run 175 print(actions)176 177 # find expected time178 time = actions_eta(actions)179 print("Running {} trials{}".format(len(actions), "" if time == 0 else " (expecting to take {}".format(str(datetime.timedelta(seconds=int(time)))) ))180 181 162 random.shuffle(actions) 163 164 print("Running {} trials".format(len(actions))) 182 165 result = [] 183 166
Note: See TracChangeset
for help on using the changeset viewer.