Index: systrace/profile_chrome/util.py |
diff --git a/systrace/profile_chrome/util.py b/systrace/profile_chrome/util.py |
index f5cb5bf370aa97c4eb59b71b32109f9db0cc6004..c87e5c490786b974c3595255f1fee501f1464d32 100644 |
--- a/systrace/profile_chrome/util.py |
+++ b/systrace/profile_chrome/util.py |
@@ -14,22 +14,17 @@ def ArchiveFiles(host_files, output): |
z.write(host_file) |
os.unlink(host_file) |
+ |
def CompressFile(host_file, output): |
with gzip.open(output, 'wb') as out, open(host_file, 'rb') as input_file: |
out.write(input_file.read()) |
os.unlink(host_file) |
-def ArchiveData(trace_results, output): |
- with zipfile.ZipFile(output, 'w', zipfile.ZIP_DEFLATED) as z: |
- for result in trace_results: |
- trace_file = result.source_name + GetTraceTimestamp() |
- WriteDataToCompressedFile(result.raw_data, trace_file) |
- z.write(trace_file) |
- os.unlink(trace_file) |
def WriteDataToCompressedFile(data, output): |
with gzip.open(output, 'wb') as out: |
out.write(data) |
+ |
def GetTraceTimestamp(): |
return time.strftime('%Y-%m-%d-%H%M%S', time.localtime()) |