summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-01-25 13:33:47 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-01-25 13:33:47 +0100
commit6eabea2d52da2bc26c23453c29b7f88b4fc69cae (patch)
tree412a67e13ed299edc9cf2e648e319f3bf3d20452 /bin
parent9771ea33a14ebd90e6878963e4f0e99be09b4aca (diff)
Re-implement basic state/transition-based analysis
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py15
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)