Commit 4a7fc4da authored by Mikhail Khokhlov's avatar Mikhail Khokhlov Committed by Commit Bot

[tools/perf] Fix file open mode in results processor

The text open mode caused proto trace corruption on Windows.

Change-Id: Idafef92472125a83352ffe8c4ee1484f45c1c561
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2390161
Auto-Submit: Mikhail Khokhlov <khokhlov@google.com>
Reviewed-by: default avatarDeep Roy <dproy@chromium.org>
Commit-Queue: Deep Roy <dproy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803868}
parent 9c792c60
...@@ -269,7 +269,7 @@ def AggregateTBMv3Traces(test_result): ...@@ -269,7 +269,7 @@ def AggregateTBMv3Traces(test_result):
proto_files = [artifacts[name]['filePath'] for name in traces] proto_files = [artifacts[name]['filePath'] for name in traces]
concatenated_path = _BuildOutputPath( concatenated_path = _BuildOutputPath(
proto_files, compute_metrics.CONCATENATED_PROTO_NAME) proto_files, compute_metrics.CONCATENATED_PROTO_NAME)
with open(concatenated_path, 'w') as concatenated_trace: with open(concatenated_path, 'wb') as concatenated_trace:
for trace_file in proto_files: for trace_file in proto_files:
if trace_file.endswith('.pb.gz'): if trace_file.endswith('.pb.gz'):
with gzip.open(trace_file, 'rb') as f: with gzip.open(trace_file, 'rb') as f:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment