summaryrefslogtreecommitdiff
path: root/bin/analyze-archive.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-01-26 12:32:49 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-01-26 12:32:49 +0100
commit3ecf5ee900b6a7a202ee2f280d628abae2a4cb91 (patch)
tree2bdc224e1f90f79c4191019e18f6f78b7288fa88 /bin/analyze-archive.py
parent7d06a51248574742a25c935f11ce95156afa06ca (diff)
support analyzing multiple measurements at once
Diffstat (limited to 'bin/analyze-archive.py')
-rwxr-xr-xbin/analyze-archive.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index fcfb139..032c7ca 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -1,17 +1,11 @@
#!/usr/bin/env python3
-import json
-import numpy as np
-import os
-from scipy.cluster.vq import kmeans2
-import struct
import sys
-import tarfile
from dfatool import EnergyModel, RawData
if __name__ == '__main__':
- filename = sys.argv[1]
- raw_data = RawData(filename)
+ filenames = sys.argv[1:]
+ raw_data = RawData(filenames)
preprocessed_data = raw_data.get_preprocessed_data()
model = EnergyModel(preprocessed_data)
@@ -25,6 +19,7 @@ if __name__ == '__main__':
trans, static_model(trans, 'energy'),
static_model(trans, 'rel_energy_prev'),
static_model(trans, 'rel_energy_next')))
+ print('{:10s}: {:.0f} µs'.format(trans, static_model(trans, 'duration')))
model.assess(model.get_static())
sys.exit(0)