From 6eabea2d52da2bc26c23453c29b7f88b4fc69cae Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 25 Jan 2018 13:33:47 +0100 Subject: Re-implement basic state/transition-based analysis --- bin/analyze-archive.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'bin/analyze-archive.py') 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) -- cgit v1.2.3