Changes in benchmark/rmit.py [7a2a3af:836c9925]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/rmit.py
r7a2a3af r836c9925 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 176 # find expected time 177 time = actions_eta(actions) 178 print("Running {} trials{}".format(len(actions), "" if time == 0 else " (expecting to take {}".format(str(datetime.timedelta(seconds=int(time)))) )) 179 162 180 random.shuffle(actions) 163 164 print("Running {} trials".format(len(actions)))165 181 result = [] 166 182 … … 209 225 d = [r[0], r[1]] 210 226 for k in headers[2:]: 211 d.append(r[2][k]) 227 try: 228 d.append(r[2][k]) 229 except: 230 d.append(0.0) 212 231 213 232 data.append(d)
Note: See TracChangeset
for help on using the changeset viewer.