diff options
author | Alexandre Rames <alexandre.rames@linaro.org> | 2015-08-26 15:14:59 +0100 |
---|---|---|
committer | Alexandre Rames <alexandre.rames@linaro.org> | 2015-08-28 10:06:25 +0100 |
commit | 1a29322efaeff955df2fb4a16aac56224edc0727 (patch) | |
tree | 5b2de9ba4fcc79d476d26d85232511147af43b7d | |
parent | c2506c3c736b07830a7d90a14c2dd470a0efc995 (diff) |
Allow specifying the name of the output `.pkl` file on the command line.
Change-Id: I837dc25d6c24bf7430765a62374213b57a205806
-rwxr-xr-x | benchmarking/java-ubenchs/run.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/benchmarking/java-ubenchs/run.py b/benchmarking/java-ubenchs/run.py index 53dbdde..4e61d6f 100755 --- a/benchmarking/java-ubenchs/run.py +++ b/benchmarking/java-ubenchs/run.py @@ -81,6 +81,8 @@ def BuildOptions(): target.''') parser.add_argument('-f', '--filter', action = 'store', default = '*', help='Quoted (benchmark name) filter pattern.') + parser.add_argument('--output-pkl', action = 'store', + help='Specify a name for the output `.pkl` file.') return parser.parse_args() @@ -231,7 +233,7 @@ if __name__ == "__main__": utils.PrintStats(result, iterations = args.iterations) print('') # Write the results to a file so they can later be used with `compare.py`. - res_filename = 'res.' + time.strftime("%Y.%m.%d-%H:%M:%S") + '.pkl' + res_filename = args.output_pkl if args.output_pkl is not None else 'res.' + time.strftime("%Y.%m.%d-%H:%M:%S") + '.pkl' with open(res_filename, 'wb') as pickle_file: pickle.dump(result, pickle_file) print(('Wrote results to %s.' % res_filename)) |