diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-01-26 12:32:49 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-01-26 12:32:49 +0100 |
commit | 3ecf5ee900b6a7a202ee2f280d628abae2a4cb91 (patch) | |
tree | 2bdc224e1f90f79c4191019e18f6f78b7288fa88 /bin/analyze-archive.py | |
parent | 7d06a51248574742a25c935f11ce95156afa06ca (diff) |
support analyzing multiple measurements at once
Diffstat (limited to 'bin/analyze-archive.py')
-rwxr-xr-x | bin/analyze-archive.py | 11 |
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) |