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