From 731eadb80d76696c7471c4c988fb9c32e151dc5e Mon Sep 17 00:00:00 2001 From: Steven Li Date: Tue, 11 May 2021 02:18:05 +0000 Subject: [PATCH] Minor tweak of the new Perf_gen tool --- tests/pytest/perf_gen.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/pytest/perf_gen.py b/tests/pytest/perf_gen.py index 03a09a2da5..f0402fbb6b 100755 --- a/tests/pytest/perf_gen.py +++ b/tests/pytest/perf_gen.py @@ -467,9 +467,14 @@ def main(): Dice.seed(0) # initial seeding of dice bName = Config.getConfig().benchmark_name - bClass = globals()[bName + 'Benchmark'] - bm = bClass() # Benchmark object - bm.run() + bClassName = bName + 'Benchmark' + x = globals() + if bClassName in globals(): + bClass = globals()[bClassName] + bm = bClass() # Benchmark object + bm.run() + else: + raise PerfGenError("No such benchmark: {}".format(bName)) # bm = Benchmark.create(Config.getConfig().target_database) # bm.run() -- GitLab