From c7d37e9039d814adb8e6c06f1462297fa5a2632e Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 18 Jan 2018 13:59:15 +0000 Subject: Update benchmark script to work when it reaches 13 --- benchmark.py | 1 + 1 file changed, 1 insertion(+) (limited to 'benchmark.py') diff --git a/benchmark.py b/benchmark.py index 1eaf9f4..8e89aea 100644 --- a/benchmark.py +++ b/benchmark.py @@ -199,6 +199,7 @@ for rulesGen in [SpanishPatienceRulesGen(), else: print("Solved " + rulesGen.name + " at level " + str(level) + " ...") + summaryResults[rulesGen.name] = level # Prints results summary table t = PrettyTable(['Solitaire', 'Level']) -- cgit v1.2.1 From a0d6f439da225987ab8635f71b17697fb49f92c7 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 18 Jan 2018 23:33:47 +0000 Subject: Add simple-hash flag to benchmark script --- benchmark.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'benchmark.py') diff --git a/benchmark.py b/benchmark.py index 8e89aea..905d960 100644 --- a/benchmark.py +++ b/benchmark.py @@ -12,11 +12,17 @@ timeoutsLimit = 4 timeoutSeconds = 1 runtype = "release" -if (len(sys.argv) == 2 +if (len(sys.argv) >= 2 and (sys.argv[1] == "--debug" or sys.argv[1] == "-d")): runtype = "debug" print("Running in debug mode...") +flag = "" +if (len(sys.argv) >= 2 + and (sys.argv[1] == "--simple-hash" or sys.argv[1] == "-sh")): + flag = "-simple-hash" + print("Running in simple-hash mode...") + class SolitaireRulesGen(metaclass=ABCMeta): def __init__(self, name): @@ -166,8 +172,9 @@ for rulesGen in [SpanishPatienceRulesGen(), timeouts = 0 for attempt in range(20): try: - run("./cmake-build-" + runtype + "/bin/solvitaire --rules " - + tempRulesFilename + " --random " + str(attempt + 1), + run("./cmake-build-" + runtype + "/bin/solvitaire" + flag + + " --rules " + tempRulesFilename + " --random " + + str(attempt + 1), shell=True, check=True, stdout=DEVNULL, -- cgit v1.2.1