mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-24 06:19:37 +00:00
Make scripts/histogram ignore lines without frame duration (#4214)
Previously the script would choke on lines generated, for example, by `cargo run`. This just skips lines that don't contain `frame duration:`. Release Notes: - N/A
This commit is contained in:
commit
edfc2e8895
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ def parse_log_file(file_path):
|
|||
elif 'µs' in time_with_unit:
|
||||
time, unit = time_with_unit[:-2], 'µs'
|
||||
else:
|
||||
raise ValueError(f"Invalid time unit in line: {line.strip()}")
|
||||
# Print an error message if we can't parse the line and then continue with rest.
|
||||
print(f'Error: Invalid time unit in line "{line.strip()}". Skipping.', file=sys.stderr)
|
||||
continue
|
||||
|
||||
data['measurement'].append(measurement)
|
||||
|
|
Loading…
Reference in a new issue