Skip to content

Commit

Permalink
Force complete match of metric keys in report extraction
Browse files Browse the repository at this point in the history
Closes elastic#15
  • Loading branch information
danielmitterdorfer committed Jan 24, 2017
1 parent 885a722 commit 98c1db7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion night_rally.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -131,6 +136,7 @@
EXAMPLE_META_REPORT = """Name,Value
Elasticsearch source revision,247cafe"""


class RecordingSystemCall:
def __init__(self, return_value):
self.calls = []
Expand Down

0 comments on commit 98c1db7

Please sign in to comment.