Make scripts/histogram ignore lines without frame duration

Previously the script would choke on lines generated, for example, by
`cargo run`.

This just skips lines that don't contain `frame duration:`.

Co-authored-by: Antonio <antonio@zed.dev>
This commit is contained in:
Thorsten BallandAntonio committed 2024-01-23 13:52:55 +01:00
1 parent bba898b70b
commit 605a7322c6
1 file changed
+1 -1
+1 -1
View File
@@ -28,7 +28,7 @@ def parse_log_file(file_path):
data = {'measurement': [], 'time': [], 'unit': [], 'log_file': []}
with open(file_path, 'r') as file:
for line in file:
if ':' not in line:
if 'duration:' not in line:
continue
parts = line.strip().split(': ')