You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/11/14 11:43:12 UTC

[tomcat] branch 10.1.x updated: Disable test for Java 16 onwards since performance is comparable

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new 1058eed2b6 Disable test for Java 16 onwards since performance is comparable
1058eed2b6 is described below

commit 1058eed2b6e94f09b8f3ecdcac3be634baa01f76
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Nov 14 11:42:53 2022 +0000

    Disable test for Java 16 onwards since performance is comparable
---
 test/org/apache/tomcat/util/buf/TestMessageBytes.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/util/buf/TestMessageBytes.java b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
index 3311996394..4abc1b6374 100644
--- a/test/org/apache/tomcat/util/buf/TestMessageBytes.java
+++ b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
@@ -23,8 +23,11 @@ import java.nio.charset.CodingErrorAction;
 import java.nio.charset.StandardCharsets;
 
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
+import org.apache.tomcat.util.compat.JreCompat;
+
 public class TestMessageBytes {
 
     private static final String CONVERSION_STRING =
@@ -100,6 +103,10 @@ public class TestMessageBytes {
      */
     @Test
     public void testConversionPerformance() {
+
+        // ISO_8859_1 conversion appears to be optimised in Java 16 onwards
+        Assume.assumeFalse(JreCompat.isJre16Available());
+
         long optimized = -1;
         long nonOptimized = -1;
 
@@ -110,7 +117,7 @@ public class TestMessageBytes {
          * once to run the test and once more in case of unexpected CI /GC
          * slowness. The test will exit early if possible.
          *
-         * MeesageBytes only optimises conversion for ISO_8859_1
+         * MessageBytes only optimises conversion for ISO_8859_1
          */
         for (int i = 0; i < 3; i++) {
             optimized = doTestOptimisedConversionPerformance();


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] branch 10.1.x updated: Disable test for Java 16 onwards since performance is comparable

Posted by Mark Thomas <ma...@apache.org>.
On 16/01/2023 12:32, Rainer Jung wrote:
> Any plans to backport this for TC 9? JreCompat seems to provide 
> isJre16Available() for TC 9, so backport should work. I can confirm I 
> still see the failures for 9.0.71, but only for Java 17 and 21 (most of 
> the runs with Java 17 but not every run; Java 16 not tested, no failures 
> for 8 and 11).
> 
> TC 8.5 does not have isJre16Available(), so backporting there would be a 
> bit bigger.
> 
> Thanks and regards,

I'll look at a back-port now.

Mark


> 
> Rainer
> 
> Am 14.11.22 um 12:43 schrieb markt@apache.org:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> markt pushed a commit to branch 10.1.x
>> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>>
>>
>> The following commit(s) were added to refs/heads/10.1.x by this push:
>>       new 1058eed2b6 Disable test for Java 16 onwards since 
>> performance is comparable
>> 1058eed2b6 is described below
>>
>> commit 1058eed2b6e94f09b8f3ecdcac3be634baa01f76
>> Author: Mark Thomas <ma...@apache.org>
>> AuthorDate: Mon Nov 14 11:42:53 2022 +0000
>>
>>      Disable test for Java 16 onwards since performance is comparable
>> ---
>>   test/org/apache/tomcat/util/buf/TestMessageBytes.java | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/test/org/apache/tomcat/util/buf/TestMessageBytes.java 
>> b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
>> index 3311996394..4abc1b6374 100644
>> --- a/test/org/apache/tomcat/util/buf/TestMessageBytes.java
>> +++ b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
>> @@ -23,8 +23,11 @@ import java.nio.charset.CodingErrorAction;
>>   import java.nio.charset.StandardCharsets;
>>   import org.junit.Assert;
>> +import org.junit.Assume;
>>   import org.junit.Test;
>> +import org.apache.tomcat.util.compat.JreCompat;
>> +
>>   public class TestMessageBytes {
>>       private static final String CONVERSION_STRING =
>> @@ -100,6 +103,10 @@ public class TestMessageBytes {
>>        */
>>       @Test
>>       public void testConversionPerformance() {
>> +
>> +        // ISO_8859_1 conversion appears to be optimised in Java 16 
>> onwards
>> +        Assume.assumeFalse(JreCompat.isJre16Available());
>> +
>>           long optimized = -1;
>>           long nonOptimized = -1;
>> @@ -110,7 +117,7 @@ public class TestMessageBytes {
>>            * once to run the test and once more in case of unexpected 
>> CI /GC
>>            * slowness. The test will exit early if possible.
>>            *
>> -         * MeesageBytes only optimises conversion for ISO_8859_1
>> +         * MessageBytes only optimises conversion for ISO_8859_1
>>            */
>>           for (int i = 0; i < 3; i++) {
>>               optimized = doTestOptimisedConversionPerformance();
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat] branch 10.1.x updated: Disable test for Java 16 onwards since performance is comparable

Posted by Rainer Jung <ra...@kippdata.de>.
Any plans to backport this for TC 9? JreCompat seems to provide 
isJre16Available() for TC 9, so backport should work. I can confirm I 
still see the failures for 9.0.71, but only for Java 17 and 21 (most of 
the runs with Java 17 but not every run; Java 16 not tested, no failures 
for 8 and 11).

TC 8.5 does not have isJre16Available(), so backporting there would be a 
bit bigger.

Thanks and regards,

Rainer

Am 14.11.22 um 12:43 schrieb markt@apache.org:
> This is an automated email from the ASF dual-hosted git repository.
> 
> markt pushed a commit to branch 10.1.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/10.1.x by this push:
>       new 1058eed2b6 Disable test for Java 16 onwards since performance is comparable
> 1058eed2b6 is described below
> 
> commit 1058eed2b6e94f09b8f3ecdcac3be634baa01f76
> Author: Mark Thomas <ma...@apache.org>
> AuthorDate: Mon Nov 14 11:42:53 2022 +0000
> 
>      Disable test for Java 16 onwards since performance is comparable
> ---
>   test/org/apache/tomcat/util/buf/TestMessageBytes.java | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/test/org/apache/tomcat/util/buf/TestMessageBytes.java b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
> index 3311996394..4abc1b6374 100644
> --- a/test/org/apache/tomcat/util/buf/TestMessageBytes.java
> +++ b/test/org/apache/tomcat/util/buf/TestMessageBytes.java
> @@ -23,8 +23,11 @@ import java.nio.charset.CodingErrorAction;
>   import java.nio.charset.StandardCharsets;
>   
>   import org.junit.Assert;
> +import org.junit.Assume;
>   import org.junit.Test;
>   
> +import org.apache.tomcat.util.compat.JreCompat;
> +
>   public class TestMessageBytes {
>   
>       private static final String CONVERSION_STRING =
> @@ -100,6 +103,10 @@ public class TestMessageBytes {
>        */
>       @Test
>       public void testConversionPerformance() {
> +
> +        // ISO_8859_1 conversion appears to be optimised in Java 16 onwards
> +        Assume.assumeFalse(JreCompat.isJre16Available());
> +
>           long optimized = -1;
>           long nonOptimized = -1;
>   
> @@ -110,7 +117,7 @@ public class TestMessageBytes {
>            * once to run the test and once more in case of unexpected CI /GC
>            * slowness. The test will exit early if possible.
>            *
> -         * MeesageBytes only optimises conversion for ISO_8859_1
> +         * MessageBytes only optimises conversion for ISO_8859_1
>            */
>           for (int i = 0; i < 3; i++) {
>               optimized = doTestOptimisedConversionPerformance();

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org