MCPcopy Create free account
hub / github.com/apache/impala / get_duration_us_from_str

Function get_duration_us_from_str

tests/util/parse_util.py:123–128  ·  view source on GitHub ↗

Parses the duration string got in profile and returns the duration in us

(duration_str)

Source from the content-addressed store, hash-verified

121
122
123def 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
131def match_memory_estimate(explain_lines):

Callers 1

test_dml_end_timeMethod · 0.90

Calls 1

searchMethod · 0.45

Tested by 1

test_dml_end_timeMethod · 0.72