summaryrefslogtreecommitdiff
path: root/bin/analyze-archive.py
diff options
context:
space:
mode:
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)