Skip to content

Commit a12d480

Browse files
author
y-p
committed
SCR: test_perf can save results frame to pickle file, -d
1 parent bb68945 commit a12d480

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

vb_suite/test_perf.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
parser.add_argument('-o', '--output',
5757
metavar="<file>",
5858
dest='log_file',
59-
help='path of file in which to save the report (default: vb_suite.log).')
59+
help='path of file in which to save the textual report (default: vb_suite.log).')
60+
parser.add_argument('-d', '--outdf',
61+
metavar="FNAME",
62+
dest='outdf',
63+
default=None,
64+
help='Name of file to df.save() the result table into. Will overwrite')
6065
parser.add_argument('-r', '--regex',
6166
metavar="REGEX",
6267
dest='regex',
@@ -198,14 +203,19 @@ def main():
198203
logfile.close()
199204

200205
prprint(s)
201-
prprint("Results were also written to the logfile at '%s'\n" %
206+
prprint("Results were also written to the logfile at '%s'" %
202207
args.log_file)
203208

204209
finally:
205210
# print("Disposing of TMP_DIR: %s" % TMP_DIR)
206211
shutil.rmtree(TMP_DIR)
207212
logfile.close()
208213

214+
if args.outdf:
215+
216+
opath = os.path.abspath(os.path.join(os.curdir,args.outdf))
217+
prprint("The results DataFrame was written to '%s'\n" % opath)
218+
totals.save(opath)
209219

210220
# hack , vbench.git ignores some commits, but we
211221
# need to be able to reference any commit.

0 commit comments

Comments
 (0)