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