OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import gzip | 5 import gzip |
6 import json | 6 import json |
7 import os | 7 import os |
8 import shutil | 8 import shutil |
9 import sys | 9 import sys |
10 import zipfile | 10 import zipfile |
11 | 11 |
12 from adb_profile_chrome import util | 12 from profile_chrome import util |
13 | 13 |
14 from pylib import constants | 14 from pylib import constants |
15 | 15 |
16 sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, | 16 sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, |
17 'third_party', | 17 'third_party', |
18 'trace-viewer')) | 18 'trace-viewer')) |
19 # pylint: disable=F0401 | 19 # pylint: disable=F0401 |
20 from trace_viewer.build import trace2html | 20 from trace_viewer.build import trace2html |
21 | 21 |
22 | 22 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 _CompressFile(trace_files[0], result) | 85 _CompressFile(trace_files[0], result) |
86 elif len(trace_files) > 1: | 86 elif len(trace_files) > 1: |
87 result = output or 'chrome-combined-trace-%s.zip' % util.GetTraceTimestamp() | 87 result = output or 'chrome-combined-trace-%s.zip' % util.GetTraceTimestamp() |
88 _ArchiveFiles(trace_files, result) | 88 _ArchiveFiles(trace_files, result) |
89 elif output: | 89 elif output: |
90 result = output | 90 result = output |
91 shutil.move(trace_files[0], result) | 91 shutil.move(trace_files[0], result) |
92 else: | 92 else: |
93 result = trace_files[0] | 93 result = trace_files[0] |
94 return result | 94 return result |
OLD | NEW |