Changeset d71db1a for benchmark


Ignore:
Timestamp:
Jul 31, 2022, 5:08:39 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
ee0176b
Parents:
6b00c53
Message:

rmit not supports unconditional args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/rmit.py

    r6b00c53 rd71db1a  
    2222
    2323def parse_range(x):
    24     result = []
    25     for part in x.split(','):
    26         if '-' in part:
    27             a, b = part.split('-')
    28             a, b = int(a), int(b)
    29             result.extend(range(a, b + 1))
    30         else:
    31             a = int(part)
    32             result.append(a)
    33     return result
     24        result = []
     25        for part in x.split(','):
     26                if '-' in part:
     27                        a, b = part.split('-')
     28                        a, b = int(a), int(b)
     29                        result.extend(range(a, b + 1))
     30                else:
     31                        a = int(part)
     32                        result.append(a)
     33        return result
    3434
    3535class DependentOpt:
     
    190190                        range(193, 257) : "0-255",
    191191                },
     192                "ocean": {
     193                        range(  1,  33) : "0-31",
     194                },
    192195        }
    193196
    194         if (host := socket.gethostname()) in known_hosts:
     197        host = socket.gethostname()
     198        if host in known_hosts:
    195199                taskset_maps = known_hosts[host]
    196200                return True
     
    229233        parser.add_argument('--trials', help='Number of trials to run per combinaison', type=int, default=3)
    230234        parser.add_argument('--notaskset', help='If specified, the trial will not use taskset to match the -p option', action='store_true')
     235        parser.add_argument('--extra', help='Extra arguments to be added unconditionally', action='append', type=str)
    231236        parser.add_argument('command', metavar='command', type=str, nargs=1, help='the command prefix to run')
    232237        parser.add_argument('candidates', metavar='candidates', type=str, nargs='*', help='the candidate suffix to run')
     
    283288        # ================================================================================
    284289        # Fixup the different commands
     290
     291        # add extras
     292        if options.extra:
     293                for act in actions:
     294                        for e in options.extra:
     295                                act.append(e)
    285296
    286297        # Add tasksets
Note: See TracChangeset for help on using the changeset viewer.