Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/rmit.py

    r883c4d9 r836c9925  
    1212import datetime
    1313import itertools
    14 import json
    1514import os
    1615import random
     
    118117        # ================================================================================
    119118        # parse command line arguments
    120         formats = ['raw', 'csv', 'json']
     119        formats = ['raw', 'csv']
    121120        parser = argparse.ArgumentParser(description='Python Script to implement R.M.I.T. testing : Randomized Multiple Interleaved Trials')
    122121        parser.add_argument('--list', help='List all the commands that would be run', action='store_true')
    123         parser.add_argument('--format', help='How to print the result', choices=formats, default='json')
     122        parser.add_argument('--format', help='How to print the result', choices=formats, default='csv')
    124123        parser.add_argument('--file', nargs='?', type=argparse.FileType('w'), default=sys.stdout)
    125124        parser.add_argument('-t', '--trials', help='Number of trials to run per combinaison', type=int, default=3)
     
    204203
    205204        # ================================================================================
    206         # Print raw
     205        # Print csv
    207206        if options.format == 'raw':
    208207                for r in result:
    209208                        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)
    216209                sys.exit(0)
    217210
Note: See TracChangeset for help on using the changeset viewer.