Make `benchmark.mojo` resilient to incorrect trace events. This patch majes `benchmark.mojo` print a warning and ignore incorrect events instead of failing hard. The warnings are surfaced in `mojo_benchmark`. Fixes #425. R=qsr@chromium.org Review URL: https://codereview.chromium.org/1343413002 . Cr-Mirrored-From: https://github.com/domokit/mojo Cr-Mirrored-Commit: 447d2f9cbe19366c55e0d192e0378ca95c4bfc56
diff --git a/mojo_benchmark b/mojo_benchmark index a8191f5..5373d35 100755 --- a/mojo_benchmark +++ b/mojo_benchmark
@@ -97,7 +97,7 @@ # Echo measurement results. for line in output_lines: - if line.strip().startswith('measurement:'): + if line.strip().startswith('measurement:') or 'WARNING' in line: print line return True