Skip to content
Permalink
Browse files
Use Pattern-cache from JMeterUtils
This will help in test plans with lots of threads (1000 tested)
  • Loading branch information
FSchumacher committed Mar 5, 2022
1 parent 74c69e2 commit d73d65fbf2ff4d325d8e6ea1fc4e203bc972fd89
Showing 1 changed file with 2 additions and 2 deletions.
@@ -394,11 +394,11 @@ private AssertionResult evaluateResponse(SampleResult response) {
}

private static boolean matchesWithJavaRegex(String toCheck, String stringPattern) {
return java.util.regex.Pattern.compile(stringPattern).matcher(toCheck).matches();
return JMeterUtils.compilePattern(stringPattern).matcher(toCheck).matches();
}

private static boolean containsWithJavaRegex(String toCheck, String stringPattern) {
return java.util.regex.Pattern.compile(stringPattern).matcher(toCheck).find();
return JMeterUtils.compilePattern(stringPattern).matcher(toCheck).find();
}

private String getStringToCheck(SampleResult response) {

0 comments on commit d73d65f

Please sign in to comment.