diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2017-04-05 19:17:43 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2017-04-05 19:17:43 +0800 |
commit | 7a56ebd9292dd5facfd3ac4da9788f2b71c4a887 (patch) | |
tree | 4b2c334490f76ef29a525f583655b09b5e9c81b4 | |
parent | 06ab004fb7c39c0d17619fa518fb3416aaa0d884 (diff) |
compare-bootcharts.py: update to specify tarball file
so that we don't need to create the directories for
the bootchart tarball files anymore
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-x | compare-bootcharts.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compare-bootcharts.py b/compare-bootcharts.py index 2057b55..b2c7a68 100755 --- a/compare-bootcharts.py +++ b/compare-bootcharts.py @@ -32,6 +32,7 @@ as a coarse indication about when the boot process is complete as perceived by the user. """ +import os import sys import tarfile @@ -77,7 +78,12 @@ def analyze_process_maps(process_map1, process_map2, jiffy_record): def parse_proc_file(pathname, process_map, jiffy_record=None): # Uncompress bootchart.tgz - with tarfile.open(pathname + '/bootchart.tgz', 'r:*') as tf: + ##with tarfile.open(pathname + '/bootchart.tgz', 'r:*') as tf: + if os.path.isdir(pathname): + parse_path = "%s/bootchart.tgz" % pathname + elif os.path.isfile(pathname): + parse_path = pathname + with tarfile.open(parse_path, 'r:*') as tf: try: # Read proc_ps.log f = tf.extractfile('proc_ps.log') |