aboutsummaryrefslogtreecommitdiff
path: root/benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark.py')
-rw-r--r--benchmark.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/benchmark.py b/benchmark.py
new file mode 100644
index 0000000..9b7316a
--- /dev/null
+++ b/benchmark.py
@@ -0,0 +1,15 @@
+import pickle
+
+class Benchmark (object):
+ def save(self, verbose=False):
+ if verbose:
+ print("Saving results to:", self.file_name + ".save")
+ with open(self.file_name + ".save", "wb") as f:
+ pickle.dump(self.results, f)
+
+ def load(self, verbose=False):
+ if verbose:
+ print("Loading results from:", self.file_name + ".save")
+ with open(self.file_name + ".save", "rb") as f:
+ self.results = pickle.load(f)
+