diff --git a/night_rally.py b/night_rally.py index 0c8b1ffc4669b..4fd274130a3b4 100644 --- a/night_rally.py +++ b/night_rally.py @@ -269,7 +269,8 @@ def is_indexing_operation(op_name): def key_for(metric_pattern, metric_key, metric_name, op_name): - if re.match(metric_pattern, metric_name): + # force full regex match + if re.match("^%s$" % metric_pattern, metric_name): if metric_key == "median_indexing_throughput": if is_indexing_operation(op_name): return metric_key diff --git a/tests.py b/tests.py index 5aa331e9b27fe..ec46a18c0754b 100644 --- a/tests.py +++ b/tests.py @@ -13,6 +13,11 @@ All,Merge throttle time,,0.00001,min All,Merge time,,0.00002,min All,Flush time,,0.00003,min +All,Merge time (postings),,1.8252,min +All,Merge time (stored fields),,0.7546166666666667,min +All,Merge time (doc values),,1.5041166666666668,min +All,Merge time (norms),,0.14778333333333335,min +All,Merge time (points),,0.26083333333333336,min All,Median CPU usage,,44.35,% All,Total Young Gen GC,,0.183,s All,Total Old Gen GC,,0.039,s @@ -131,6 +136,7 @@ EXAMPLE_META_REPORT = """Name,Value Elasticsearch source revision,247cafe""" + class RecordingSystemCall: def __init__(self, return_value): self.calls = []