Parses the duration string got in profile and returns the duration in us
(duration_str)
| 121 | |
| 122 | |
| 123 | def get_duration_us_from_str(duration_str): |
| 124 | """Parses the duration string got in profile and returns the duration in us""" |
| 125 | match_res = re.search(r"\((\d+) us\)", duration_str) |
| 126 | if match_res: |
| 127 | return int(match_res.group(1)) |
| 128 | raise Exception("Illegal duration string: " + duration_str) |
| 129 | |
| 130 | |
| 131 | def match_memory_estimate(explain_lines): |