summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-07-14 16:59:14 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-07-14 16:59:25 +0200
commit3b9cec6634b02f2808f9f0383b51e643602013e3 (patch)
tree841adf08d48abe4102fad9a61eabf09897171fdb
parent701b344471fe5e0b90d95e1ac2c3c9525bb7dcfb (diff)
Add --no-cache option
-rwxr-xr-xbin/analyze-archive.py9
-rw-r--r--lib/loader.py4
2 files changed, 9 insertions, 4 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index c531bb6..3075e3d 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -101,6 +101,9 @@ Options:
--export-energymodel=<model.json>
Export energy model. Works out of the box for v1 and v2 logfiles. Requires --hwmodel for v0 logfiles.
+
+--no-cache
+ Do not load cached measurement results
"""
import getopt
@@ -300,7 +303,7 @@ if __name__ == "__main__":
try:
optspec = (
- "info "
+ "info no-cache "
"plot-unparam= plot-param= plot-traces= show-models= show-quality= "
"ignored-trace-indexes= function-override= "
"export-traces= "
@@ -362,7 +365,9 @@ if __name__ == "__main__":
sys.exit(2)
raw_data = RawData(
- args, with_traces=("export-traces" in opt or "plot-traces" in opt)
+ args,
+ with_traces=("export-traces" in opt or "plot-traces" in opt),
+ skip_cache=("no-cache" in opt),
)
if "info" in opt:
diff --git a/lib/loader.py b/lib/loader.py
index c35eb4c..4e07c92 100644
--- a/lib/loader.py
+++ b/lib/loader.py
@@ -242,7 +242,7 @@ class RawData:
file system, making subsequent loads near-instant.
"""
- def __init__(self, filenames, with_traces=False):
+ def __init__(self, filenames, with_traces=False, skip_cache=False):
"""
Create a new RawData object.
@@ -321,7 +321,7 @@ class RawData:
self.pta = self.ptalog["pta"]
self.set_cache_file()
- if not with_traces:
+ if not with_traces and not skip_cache:
self.load_cache()
def set_cache_file(self):