aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthecharlesblake2018-01-18 23:33:47 +0000
committerthecharlesblake2018-01-18 23:33:47 +0000
commita0d6f439da225987ab8635f71b17697fb49f92c7 (patch)
tree61c546b8ab67c15c4e77b36646236cc0401b5299
parentAdd SIMPLE_HASH debug flag to cache logic (diff)
downloadmetasol-a0d6f439da225987ab8635f71b17697fb49f92c7.tar.gz
metasol-a0d6f439da225987ab8635f71b17697fb49f92c7.zip

Add simple-hash flag to benchmark script

-rw-r--r--benchmark.py13
1 files changed, 10 insertions, 3 deletions
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,