FSchumacher commented on a change in pull request #700:
URL: https://github.com/apache/jmeter/pull/700#discussion_r815319473



##########
File path: 
src/components/src/main/java/org/apache/jmeter/assertions/JSONPathAssertion.java
##########
@@ -164,8 +166,12 @@ private boolean arrayMatched(JSONArray value) {
     private boolean isEquals(Object subj) {
         if (isUseRegex()) {
             String str = objectToString(subj);
-            Pattern pattern = 
JMeterUtils.getPatternCache().getPattern(getExpectedValue());
-            return JMeterUtils.getMatcher().matches(str, pattern);
+            if (useJavaRegex) {
+                return java.util.regex.Pattern.matches(getExpectedValue(), 
str);
+            } else {
+                Pattern pattern = 
JMeterUtils.getPatternCache().getPattern(getExpectedValue());

Review comment:
       I have done some simple performance tests with the ResponseAssertion.
   95% response time/99% response time/Transactions per second for *X* number 
of threads.
   
   |Threads|Oro|Java (no cache)|Java (with cache)|
   |-----------|-----|---------------------|-----------------------|
   |1     |1.0/1.0/4266.62|1.0/1.0/5763.90|1.0/1.0/5722.43|
   |10   |1.0/5.0/12939.44|1.0/5.0/12731.02|1.0/5.0/12939.44|
   |100 |6.0/58.99/9862.14|6.0/77.0/11897.78|5.0/79.0/11887.85|
   |1000|9.0/259.0/7867.21|3.0/56.0/9773.83|4.0/36.0/10056.35|
   
   The test was one JSR-223 Groovy Sampler generating a long text and one 
ResponseAssertion asserting a contains (of the last line).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to