Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/rmit.py

    rdbb1073 r7a2a3af  
    1010
    1111import argparse
    12 import datetime
    1312import itertools
    1413import os
     
    102101        return nopts
    103102
    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 
    116103if __name__ == "__main__":
    117104        # ================================================================================
     
    173160        # ================================================================================
    174161        # 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 
    181162        random.shuffle(actions)
     163
     164        print("Running {} trials".format(len(actions)))
    182165        result = []
    183166
Note: See TracChangeset for help on using the changeset viewer.