diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-01-25 13:33:47 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-01-25 13:33:47 +0100 |
commit | 6eabea2d52da2bc26c23453c29b7f88b4fc69cae (patch) | |
tree | 412a67e13ed299edc9cf2e648e319f3bf3d20452 /bin | |
parent | 9771ea33a14ebd90e6878963e4f0e99be09b4aca (diff) |
Re-implement basic state/transition-based analysis
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index c3a1547..a2596d3 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -7,11 +7,20 @@ from scipy.cluster.vq import kmeans2 import struct import sys import tarfile -from dfatool import AEMRAnalyzer +from dfatool import Analysis, RawData if __name__ == '__main__': filename = sys.argv[1] - analyzer = AEMRAnalyzer(filename) + raw_data = RawData(filename) - analyzer.preprocess() + preprocessed_data = raw_data.get_preprocessed_data() + print(preprocessed_data) + foo = Analysis(preprocessed_data) + res = foo.analyze() + print(res) + for key in res.keys(): + print(key) + for subkey in res[key].keys(): + if subkey != 'isa' and len(res[key][subkey]) > 0: + print(' {:s}: {:f}'.format(subkey, np.mean(res[key][subkey]))) sys.exit(0) |