mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 12:19:28 +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:
|
elif 'µs' in time_with_unit:
|
||||||
time, unit = time_with_unit[:-2], 'µs'
|
time, unit = time_with_unit[:-2], 'µs'
|
||||||
else:
|
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
|
continue
|
||||||
|
|
||||||
data['measurement'].append(measurement)
|
data['measurement'].append(measurement)
|
||||||
|
|
Loading…
Reference in a new issue