diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-08 15:43:39 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-08 15:43:39 +0200 |
commit | 283bdad5ab7fa461be535c2b8c7beefab96c2ee1 (patch) | |
tree | 4d79714910e3489386a383279fb984379d7a2690 /lib | |
parent | 906c1e0c71c8ad58934990ebe686adf7496e0dce (diff) | |
parent | 67f44728a1dd9a3c786bd5602bd1ac0834ebd8ea (diff) |
Merge branch 'master' into lennart
Diffstat (limited to 'lib')
-rw-r--r-- | lib/loader.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/loader.py b/lib/loader.py index 77b8652..c35eb4c 100644 --- a/lib/loader.py +++ b/lib/loader.py @@ -305,6 +305,7 @@ class RawData: self._parameter_names = None self.ignore_clipping = False self.pta = None + self.ptalog = None with tarfile.open(filenames[0]) as tf: for member in tf.getmembers(): @@ -315,6 +316,9 @@ class RawData: elif ".etlog" in member.name: self.version = 2 break + if self.version >= 1: + self.ptalog = json.load(tf.extractfile(tf.getmember("ptalog.json"))) + self.pta = self.ptalog["pta"] self.set_cache_file() if not with_traces: @@ -334,6 +338,8 @@ class RawData: self.preprocessing_stats = cache_data["preprocessing_stats"] if "pta" in cache_data: self.pta = cache_data["pta"] + if "ptalog" in cache_data: + self.ptalog = cache_data["ptalog"] self.setup_by_fileno = cache_data["setup_by_fileno"] self.preprocessed = True @@ -350,6 +356,7 @@ class RawData: "traces": self.traces, "preprocessing_stats": self.preprocessing_stats, "pta": self.pta, + "ptalog": self.ptalog, "setup_by_fileno": self.setup_by_fileno, } json.dump(cache_data, f) @@ -847,8 +854,7 @@ class RawData: new_filenames = list() with tarfile.open(filename) as tf: - ptalog = json.load(tf.extractfile(tf.getmember("ptalog.json"))) - self.pta = ptalog["pta"] + ptalog = self.ptalog # Benchmark code may be too large to be executed in a single # run, so benchmarks (a benchmark is basically a list of DFA runs) @@ -902,8 +908,7 @@ class RawData: new_filenames = list() with tarfile.open(filename) as tf: - ptalog = json.load(tf.extractfile(tf.getmember("ptalog.json"))) - self.pta = ptalog["pta"] + ptalog = self.ptalog # Benchmark code may be too large to be executed in a single # run, so benchmarks (a benchmark is basically a list of DFA runs) |