|
26 | 26 |
|
27 | 27 | """
|
28 | 28 |
|
| 29 | +# IMPORTANT NOTE |
| 30 | +# |
| 31 | +# This script should run on pandas versions at least as far back as 0.9.1. |
| 32 | +# devs should be able to use the latest version of this script with |
| 33 | +# any dusty old commit and expect it to "just work". |
| 34 | +# One way in which this is useful is when collecting historical data, |
| 35 | +# where writing some logic around this script may prove easier |
| 36 | +# in some cases then running vbench directly (think perf bisection). |
| 37 | +# |
| 38 | +# *please*, when you modify this script for whatever reason, |
| 39 | +# make sure you do not break it's functionality when running under older |
| 40 | +# pandas versions. |
| 41 | +# Note that depreaction warnings are turned off in main(), so there's |
| 42 | +# no need to change the actual code to supress such warnings. |
| 43 | + |
29 | 44 | import shutil
|
30 | 45 | import os
|
31 | 46 | import sys
|
@@ -302,7 +317,7 @@ def report_comparative(head_res,baseline_res):
|
302 | 317 |
|
303 | 318 | if args.outdf:
|
304 | 319 | prprint("The results DataFrame was written to '%s'\n" % args.outdf)
|
305 |
| - totals.to_pickle(args.outdf) |
| 320 | + totals.save(args.outdf) |
306 | 321 |
|
307 | 322 | def profile_head_single(benchmark):
|
308 | 323 | import gc
|
@@ -378,7 +393,7 @@ def profile_head(benchmarks):
|
378 | 393 |
|
379 | 394 | if args.outdf:
|
380 | 395 | prprint("The results DataFrame was written to '%s'\n" % args.outdf)
|
381 |
| - DataFrame(results).to_pickle(args.outdf) |
| 396 | + DataFrame(results).save(args.outdf) |
382 | 397 |
|
383 | 398 | def print_report(df,h_head=None,h_msg="",h_baseline=None,b_msg=""):
|
384 | 399 |
|
@@ -462,8 +477,8 @@ def main():
|
462 | 477 | np.random.seed(args.seed)
|
463 | 478 |
|
464 | 479 | if args.base_pickle and args.target_pickle:
|
465 |
| - baseline_res = prep_pickle_for_total(pd.read_pickle(args.base_pickle)) |
466 |
| - target_res = prep_pickle_for_total(pd.read_pickle(args.target_pickle)) |
| 480 | + baseline_res = prep_pickle_for_total(pd.load(args.base_pickle)) |
| 481 | + target_res = prep_pickle_for_total(pd.load(args.target_pickle)) |
467 | 482 |
|
468 | 483 | report_comparative(target_res, baseline_res)
|
469 | 484 | sys.exit(0)
|
|
0 commit comments