I'm trying to parse the JMeter log in the Jenkins console with groovy postbuild. But I want the last line only, since that gives the average req/sec for all the connections. (Example: summary = 2 in 1s = 3.0/s Avg: 107 Min: 56 Max: 159 Err: 0 (0.00%))
But my current groovy postbuild script just picks the first hit in the console. What I want is the same as what I would get if the console searched was started from the end. (reverse) I.e. the last match in the console.
Current:
def summary_matcher = manager.getLogMatcher(".summary = (.)(.Err:)(.*)\$")
manager.addShortText(summary_matcher.group(1)[0..-1] + .......)
And I cannot improve the summary pattern to just pick the final line...