From ec0edd399d3ef493c4ddb0e821a56b53a19dbc96 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Sep 2018 13:23:52 +0200 Subject: Add model to benchmarks --- scripts/serd_bench.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/serd_bench.py b/scripts/serd_bench.py index e6f12cc8..e4adb0ec 100755 --- a/scripts/serd_bench.py +++ b/scripts/serd_bench.py @@ -43,8 +43,8 @@ def gen(sp2b_dir, n_min, n_max, step): def write_header(results, progs): "Write the header line for TSV output" - results.write("n") - for prog in progs: + results.write('n\tserdi_stream\tserdi_model') + for prog in progs[2:]: results.write("\t" + os.path.basename(prog.split()[0])) results.write("\n") @@ -151,7 +151,7 @@ def run(progs, n_min, n_max, step): time, memory = parse_time(proc.communicate()[1].decode()) rows["time"] += ["%.07f" % time] - rows["throughput"] += ["%d" % (n / time)] + rows["throughput"] += ["%d" % (n / time)] if time > 0.0 else 0 rows["memory"] += [str(memory)] # Write rows to output files @@ -223,7 +223,9 @@ example: args = ap.parse_args(sys.argv[1:]) - progs = ["serdi -b -f -i turtle -o turtle"] + args.run + progs = ['serdi -b -i turtle -o turtle', + 'serdi -m -b -i turtle -o turtle'] + args.run + min_n = int(args.max / 10) max_n = args.max step = min_n -- cgit v1.2.1