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 |
(...skipping 74 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 |