(file_path)
| 6 | |
| 7 | |
| 8 | def read_compile_log(file_path): |
| 9 | # Regex pattern to match lines with "value: __ ms" |
| 10 | pattern = r'([\w: ]+):\s*([\d.]+(?:e[+-]?\d+)?)ms' |
| 11 | |
| 12 | data = [] |
| 13 | |
| 14 | # Read the file and find matches |
| 15 | with open(file_path, 'r') as file: |
| 16 | for line in file: |
| 17 | match = re.search(pattern, line) |
| 18 | if match: |
| 19 | operation = match.group(1).strip() |
| 20 | try: |
| 21 | value = float(match.group(2)) |
| 22 | data.append({'Operation': operation, 'Value': value}) |
| 23 | except: |
| 24 | print(f"Invalid Float: {match.group(2)}") |
| 25 | |
| 26 | return data |
| 27 | |
| 28 | |
| 29 | def filter_data(data, quantile): |
no test coverage detected