- Timestamp:
- Nov 12, 2020, 1:26:38 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- 0989e79, 9d264e18, f2ccbfd
- Parents:
- 3746f777 (diff), 0b996a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
benchmark/rmit.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/rmit.py
r3746f777 r8ca26d5 12 12 import datetime 13 13 import itertools 14 import json 14 15 import os 15 16 import random … … 117 118 # ================================================================================ 118 119 # parse command line arguments 119 formats = ['raw', 'csv' ]120 formats = ['raw', 'csv', 'json'] 120 121 parser = argparse.ArgumentParser(description='Python Script to implement R.M.I.T. testing : Randomized Multiple Interleaved Trials') 121 122 parser.add_argument('--list', help='List all the commands that would be run', action='store_true') 122 parser.add_argument('--format', help='How to print the result', choices=formats, default=' csv')123 parser.add_argument('--format', help='How to print the result', choices=formats, default='json') 123 124 parser.add_argument('--file', nargs='?', type=argparse.FileType('w'), default=sys.stdout) 124 125 parser.add_argument('-t', '--trials', help='Number of trials to run per combinaison', type=int, default=3) … … 203 204 204 205 # ================================================================================ 205 # Print csv206 # Print raw 206 207 if options.format == 'raw': 207 208 for r in result: 208 209 print(r, file=options.file) 210 sys.exit(0) 211 212 # ================================================================================ 213 # Print json 214 if options.format == 'json': 215 json.dump(result, options.file) 209 216 sys.exit(0) 210 217
Note:
See TracChangeset
for help on using the changeset viewer.