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

Function getCounterValues

tests/custom_cluster/test_tuple_cache.py:52–59  ·  view source on GitHub ↗
(profile, key)

Source from the content-addressed store, hash-verified

50
51
52def getCounterValues(profile, key):
53 # This matches lines like these:
54 # NumTupleCacheHits: 1 (1)
55 # TupleCacheBytesWritten: 123.00 B (123)
56 # The regex extracts the value inside the parenthesis to get a simple numeric value
57 # rather than a pretty print of the same value.
58 counter_str_list = re.findall(r"{0}{1}: .* \((.*)\)".format(NODE_INDENT, key), profile)
59 return [int(v) for v in counter_str_list]
60
61
62def assertCounterOrder(profile, key, vals):

Callers 5

assertCounterOrderFunction · 0.85
assertCounterFunction · 0.85
test_aggregateMethod · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected