Re: (tomcat) 09/12: This is a performance test - use correct naming
Hi Rainer, Apologies for this and the other failures. I was trying to reduce the reports of ignored tests during release testing so it was more obvious when the OpenSSL (via JNI and/or FFM) were not executed. I was working on the basis that the performance tests weren't executed by default. While that is true for CI systems, it isn't generally true and I need to take another pass at these changes. I'm not sure if I just need to recategorise a small number of tests or if some new category will be required. I need to look at all of the current performance tests to better understand the range of what we have. I'm planning on starting this work now so barring any distractions I should get this fixed today. Personally, I don't have any concerns voting +1 for a release without executing the peformance tests (or manually exclusing a few of them) this time around but obviously that is a decision each PMC member needs to make for themselves and I understand if the consensus is I need to re-roll the release. Mark On 07/01/2024 10:01, Rainer Jung wrote: Am 03.01.24 um 12:29 schrieb ma...@apache.org: This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 8fe3db67fdd69c160367982e85b23bfe01689c5c Author: Mark Thomas AuthorDate: Wed Jan 3 10:43:07 2024 + This is a performance test - use correct naming --- .../{TestConnectionLimit.java => TestConnectionLimitPerformance.java} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/org/apache/tomcat/websocket/TestConnectionLimit.java b/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java similarity index 96% rename from test/org/apache/tomcat/websocket/TestConnectionLimit.java rename to test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java index 463ee95b01..6fc045622c 100644 --- a/test/org/apache/tomcat/websocket/TestConnectionLimit.java +++ b/test/org/apache/tomcat/websocket/TestConnectionLimitPerformance.java @@ -25,7 +25,6 @@ import jakarta.websocket.DeploymentException; import jakarta.websocket.WebSocketContainer; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; import org.apache.catalina.Context; @@ -34,8 +33,7 @@ import org.apache.catalina.startup.Tomcat; import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; -@Ignore // Not for use in normal unit test runs -public class TestConnectionLimit extends TomcatBaseTest { +public class TestConnectionLimitPerformance extends TomcatBaseTest { /* * Simple test to see how many outgoing connections can be created on a single machine. This test - which probably wasn't executed before - now fails frequently for me. The failure is with java.lang.NoClassDefFoundError in various places. An example: Testcase: testSingleMachine took 9.285 sec Caused an ERROR org/apache/catalina/startup/ExpandWar java.lang.NoClassDefFoundError: org/apache/catalina/startup/ExpandWar at org.apache.catalina.startup.LoggingBaseTest.tearDown(LoggingBaseTest.java:138) at org.apache.catalina.startup.TomcatBaseTest.tearDown(TomcatBaseTest.java:243) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.ExpandWar at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) Testcase: org.apache.tomcat.websocket.TestConnectionLimitPerformance took 0 sec Caused an ERROR org/apache/catalina/startup/ExpandWar java.lang.NoClassDefFoundError: org/apache/catalina/startup/ExpandWar at org.apache.catalina.startup.LoggingBaseTest.tearDownPerTestClass(LoggingBaseTest.java:154) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.ExpandWar The stacks can differ and also the classes in the java.lang.NoClassDefFoundError: jakarta/websocket/SendResult org/apache/catalina/Lifecycle$SingleUse org/apache/catalina/startup/ExpandWar org/apache/tomcat/PeriodicEventListener org/apache/tomcat/util/net/SocketWrapperBase$BlockingMode org/apache/tomcat/util/net/SocketWrapperBase$CompletionState org/apache/tomcat/websocket/MessagePart org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer$1 org/apache/tomcat/websocket/WsRemoteEndpointImplBase$BlockingSendHandler Wild guess: it might be, because the tested process runs out of file descriptors before: 06-Jan-2024 09:59:21.358 SEVERE [http
Re: [VOTE] Release Apache Tomcat 11.0.0-M16
On 07/01/2024 23:26, Igal Sapir wrote: Have there been any recent changes that might affect org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance using NIO2? I ran it a few times and it fails on Linux with Azul Java 21.0.1+12-LTS - org.apache.tomcat.util.net.AbstractEndpoint.processSocket Executor rejected sock et [org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper@54bff557:Closed Nio2Channel] for processing java.util.concurrent.RejectedExecutionException: Executor not running, can't force a command into the queue Full output below. Yes. My fault. See full reply to Rainer at: https://lists.apache.org/thread/lkwh053gfsq6yzvm2cdpp7v77cdmtrxp Mark Igal ❯ cat /workspace/build/tomcat/main/build/logs/TEST-org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO2.txt Testsuite: org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 26.312 sec - Standard Output --- Sent Hello message, waiting for data Expected diff < 500,000 but was [567099], count [56] Expected diff < 500,000 but was [709569], count [65] Expected diff < 500,000 but was [537496], count [110] Expected diff < 500,000 but was [502372], count [116] Expected diff < 500,000 but was [595551], count [152] Expected diff < 500,000 but was [533207], count [164] Expected diff < 500,000 but was [534436], count [176] Expected diff < 500,000 but was [600551], count [179] Expected diff < 500,000 but was [523944], count [182] Expected diff < 500,000 but was [532614], count [185] Expected diff < 500,000 but was [657567], count [188] Expected diff < 500,000 but was [846194], count [191] Expected diff < 500,000 but was [532466], count [194] Expected diff < 500,000 but was [514685], count [224] Expected diff < 500,000 but was [519522], count [230] Expected diff < 500,000 but was [554426], count [239] Expected diff < 500,000 but was [527420], count [245] Expected diff < 500,000 but was [610897], count [269] Expected diff < 500,000 but was [624163], count [281] Expected diff < 500,000 but was [841963], count [287] Expected diff < 500,000 but was [519565], count [293] Expected diff < 500,000 but was [635134], count [302] Expected diff < 500,000 but was [660258], count [305] Expected diff < 500,000 but was [501776], count [311] Expected diff < 500,000 but was [56], count [314] Expected diff < 500,000 but was [581086], count [323] Expected diff < 500,000 but was [609751], count [326] Expected diff < 500,000 but was [645257], count [332] Expected diff < 500,000 but was [688288], count [335] Expected diff < 500,000 but was [554412], count [338] Expected diff < 500,000 but was [563938], count [359] Expected diff < 500,000 but was [562841], count [362] Expected diff < 500,000 but was [673779], count [365] Expected diff < 500,000 but was [546897], count [371] Expected diff < 500,000 but was [643343], count [374] Expected diff < 500,000 but was [723508], count [383] Expected diff < 500,000 but was [594315], count [392] Expected diff < 500,000 but was [752402], count [395] Expected diff < 500,000 but was [500642], count [401] Expected diff < 500,000 but was [544715], count [410] Expected diff < 500,000 but was [547439], count [413] Expected diff < 500,000 but was [529557], count [416] Expected diff < 500,000 but was [504613], count [428] Expected diff < 500,000 but was [509866], count [434] Expected diff < 500,000 but was [550444], count [440] Expected diff < 500,000 but was [550533], count [455] Expected diff < 500,000 but was [506029], count [467] Expected diff < 500,000 but was [637453], count [470] Expected diff < 500,000 but was [640345], count [479] Expected diff < 500,000 but was [716690], count [485] Expected diff < 500,000 but was [17129814], count [488] Expected diff > 40ms but was [33748798], count [489] Expected diff < 500,000 but was [1130429], count [490] Expected diff < 500,000 but was [517541], count [491] Expected diff < 500,000 but was [501639], count [497] Expected diff < 500,000 but was [593562], count [500] Expected diff < 500,000 but was [681615], count [503] Expected diff < 500,000 but was [532502], count [524] Expected diff < 500,000 but was [598957], count [527] Expected diff < 500,000 but was [611344], count [539] Expected diff < 500,000 but was [627601], count [554] Expected diff < 500,000 but was [574242], count [557] Expected diff < 500,000 but was [548632], count [566] Expected diff < 500,000 but was [542409], count [578] Expected diff < 500,000 but was [538701], count [584] Expected diff < 500,000 but was [500443], count [602] Expected diff < 500,000 but was [582018], count [608] Expected diff < 500,000 but was [567923], count [635] Expected diff < 500,000 but was [512395], count [656] Expected diff < 500,000 but was [647834], count [662] Expected diff < 500,000 but was [532620], count [665] Expected diff < 500,000 but was [506794], count [668] Expected diff < 500,000 but was [578525], count [689] Expec
Re: [VOTE] Release Apache Tomcat 10.1.18
On Fri, Jan 5, 2024 at 4:25 PM Christopher Schultz wrote: > > The proposed Apache Tomcat 10.1.18 release is now available for > voting. > > The notable changes compared to 10.1.17 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > For full details, see the change log: > https://nightlies.apache.org/tomcat/tomcat-10.1.x/docs/changelog.html > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 > without changes. Java EE applications designed for Tomcat 9 and earlier > may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat > will automatically convert them to Jakarta EE and copy them to the > webapps directory. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.18/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1476 > > The tag is: > https://github.com/apache/tomcat/tree/10.1.18 > dd75fed1ae949455531e6a1aae55fb6ea7615786 > > The proposed 10.1.18 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 10.1.18 Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.98
On Fri, Jan 5, 2024 at 5:54 PM Christopher Schultz wrote: > > The proposed Apache Tomcat 8.5.98 release is now available for voting. > > The notable changes compared to 8.5.97 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > Along with lots of other bug fixes and improvements. > > For full details, see the changelog: > https://nightlies.apache.org/tomcat/tomcat-8.5.x/docs/changelog.html > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.98/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1478 > > The tag is: > https://github.com/apache/tomcat/tree/8.5.98/ > 8653b0fc34bdb2a673ec5c306b1a95a7d466eaf4 > > The proposed 8.5.98 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 8.5.98 (stable) Rémy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated: Add license
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/main by this push: new 72430c2072 Add license 72430c2072 is described below commit 72430c20722a0cb85cec25a805c23c54969f6797 Author: remm AuthorDate: Mon Jan 8 13:02:41 2024 +0100 Add license --- res/ide-support/idea/compiler.xml | 16 res/ide-support/idea/workspace.xml | 16 2 files changed, 32 insertions(+) diff --git a/res/ide-support/idea/compiler.xml b/res/ide-support/idea/compiler.xml index dc73b5a101..c65738a15b 100644 --- a/res/ide-support/idea/compiler.xml +++ b/res/ide-support/idea/compiler.xml @@ -1,4 +1,20 @@ + diff --git a/res/ide-support/idea/workspace.xml b/res/ide-support/idea/workspace.xml index 761caf13ad..bb47d31574 100644 --- a/res/ide-support/idea/workspace.xml +++ b/res/ide-support/idea/workspace.xml @@ -1,4 +1,20 @@ + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 11.0.0-M16
Mark, Thanks for RMing On 1/4/24 4:08 PM, Mark Thomas wrote: The proposed Apache Tomcat 11.0.0-M16 release is now available for voting. Apache Tomcat 11.0.0-M16 is a milestone release of the 11.0.x branch and has been made to provide users with early access to the new features in Apache Tomcat 11.0.x so that they may provide feedback. The notable changes compared to the previous milestone include: - Fix virtual thread support for the NIO2 connector - Correct a regression in the fix for 67675 that broke TLS key file parsing for PKCS#8 format keys that do not specify an explicit pseudo-random function and rely on the default. This typically affects keys generated by OpenSSL 1.0.2. - Allow multiple operations with the same name on introspected mbeans, fixing a regression caused by the introduction of a second addSslHostConfig() method. For full details, see the change log: https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html Applications that run on Tomcat 9 and earlier will not run on Tomcat 11 without changes. Java EE applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. Applications using deprecated APIs may require further changes. It can be obtained from: https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M16/ The Maven staging repo is: https://repository.apache.org/content/repositories/orgapachetomcat-1474 The tag is: https://github.com/apache/tomcat/tree/11.0.0-M16 ca6ea22e9b6c47df1db85e9af80f80431c3ea19e The proposed 11.0.0-M16 release is: [ ] -1 Broken - do not release [ ] +1 Alpha - go ahead and release as 11.0.0-M16 +1 for alpha release Unit tests pass on MacOS, except for one performance-related one that should not hold-up the release. * Environment * Java (build): openjdk version "22-ea" 2024-03-19 OpenJDK Runtime Environment (build 22-ea+27-2262) OpenJDK 64-Bit Server VM (build 22-ea+27-2262, mixed mode, sharing) * Java (test): openjdk version "22-ea" 2024-03-19 OpenJDK Runtime Environment (build 22-ea+27-2262) OpenJDK 64-Bit Server VM (build 22-ea+27-2262, mixed mode, sharing) * OS: Darwin 21.6.0 x86_64 * cc: Apple clang version 12.0.0 (clang-1200.0.31.1) * make: GNU Make 3.81 * OpenSSL: OpenSSL 3.1.4 24 Oct 2023 (Library: OpenSSL 3.1.4 24 Oct 2023) * APR: 1.7.4 * * Valid SHA-512 signature for apache-tomcat-11.0.0-M16.zip * Valid GPG signature for apache-tomcat-11.0.0-M16.zip * Valid SHA-512 signature for apache-tomcat-11.0.0-M16.tar.gz * Valid GPG signature for apache-tomcat-11.0.0-M16.tar.gz * Valid SHA-512 signature for apache-tomcat-11.0.0-M16.exe * Valid GPG signature for apache-tomcat-11.0.0-M16.exe * Valid SHA512 signature for apache-tomcat-11.0.0-M16-src.zip * Valid GPG signature for apache-tomcat-11.0.0-M16-src.zip * Valid SHA512 signature for apache-tomcat-11.0.0-M16-src.tar.gz * Valid GPG signature for apache-tomcat-11.0.0-M16-src.tar.gz * * Binary Zip and tarball: Same * Source Zip and tarball: Same * * Building dependencies returned: 0 * tcnative builds cleanly * Tomcat builds cleanly * Junit Tests: FAILED * * Tests that failed: * org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO.txt * org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO2.txt - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 11.0.0-M16
On Thu, Jan 4, 2024 at 1:08 PM Mark Thomas wrote: > The proposed Apache Tomcat 11.0.0-M16 release is now available for > voting. > > Apache Tomcat 11.0.0-M16 is a milestone release of the 11.0.x branch and > has been made to provide users with early access to the new features in > Apache Tomcat 11.0.x so that they may provide feedback. The notable > changes compared to the previous milestone include: > > - Fix virtual thread support for the NIO2 connector > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > For full details, see the change log: > https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 11 > without changes. Java EE applications designed for Tomcat 9 and earlier > may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat > will automatically convert them to Jakarta EE and copy them to the > webapps directory. Applications using deprecated APIs may require > further changes. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M16/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1474 > > The tag is: > https://github.com/apache/tomcat/tree/11.0.0-M16 > ca6ea22e9b6c47df1db85e9af80f80431c3ea19e > > > The proposed 11.0.0-M16 release is: > [ ] -1 Broken - do not release > [X] +1 Alpha - go ahead and release as 11.0.0-M16 > +1 Igal > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: [VOTE] Release Apache Tomcat 10.1.18
On Fri, Jan 5, 2024 at 7:25 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > The proposed Apache Tomcat 10.1.18 release is now available for > voting. > > The notable changes compared to 10.1.17 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > For full details, see the change log: > https://nightlies.apache.org/tomcat/tomcat-10.1.x/docs/changelog.html > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 > without changes. Java EE applications designed for Tomcat 9 and earlier > may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat > will automatically convert them to Jakarta EE and copy them to the > webapps directory. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.18/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1476 > > The tag is: > https://github.com/apache/tomcat/tree/10.1.18 > dd75fed1ae949455531e6a1aae55fb6ea7615786 > > The proposed 10.1.18 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 10.1.18 > +1 Igal > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: [VOTE] Release Apache Tomcat 9.0.85
On Fri, Jan 5, 2024 at 1:26 AM Rémy Maucherat wrote: > The proposed Apache Tomcat 9.0.85 release is now available for voting. > > The notable changes compared to 9.0.84 are: > > - Fix virtual thread support for the NIO2 connector > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > For full details, see the changelog: > https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.85/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1475 > The tag is: > https://github.com/apache/tomcat/tree/9.0.85 > 012c7e28ee86df331d04d1523d0e892564aa31eb > > The proposed 9.0.85 release is: > [ ] -1, Broken - do not release > [X] +1, Stable - go ahead and release as 9.0.85 > +1 Igal > > Rémy > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
(tomcat) 02/08: Add additional comment to existing absolute performance tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 7a03eb497045752bd6d81b4326669d57affb2bdd Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:53 2024 + Add additional comment to existing absolute performance tests --- test/jakarta/el/TesterImportHandlerPerformance.java | 4 test/jakarta/websocket/TesterContainerProviderPerformance.java | 4 .../authenticator/TesterDigestAuthenticatorPerformance.java | 4 test/org/apache/tomcat/unittest/TesterThreadedPerformance.java | 3 +++ test/org/apache/tomcat/util/bcel/TesterPerformance.java | 6 ++ test/org/apache/tomcat/util/http/TesterCookiesPerformance.java | 4 test/org/apache/tomcat/util/http/TesterParametersPerformance.java | 4 7 files changed, 29 insertions(+) diff --git a/test/jakarta/el/TesterImportHandlerPerformance.java b/test/jakarta/el/TesterImportHandlerPerformance.java index c2c267c851..77e39e7624 100644 --- a/test/jakarta/el/TesterImportHandlerPerformance.java +++ b/test/jakarta/el/TesterImportHandlerPerformance.java @@ -18,6 +18,10 @@ package jakarta.el; import org.junit.Test; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterImportHandlerPerformance { /* diff --git a/test/jakarta/websocket/TesterContainerProviderPerformance.java b/test/jakarta/websocket/TesterContainerProviderPerformance.java index a3c8a87f46..0e2c7181b3 100644 --- a/test/jakarta/websocket/TesterContainerProviderPerformance.java +++ b/test/jakarta/websocket/TesterContainerProviderPerformance.java @@ -23,6 +23,10 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterThreadedPerformance; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterContainerProviderPerformance { @Test diff --git a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java index ad417f2e5c..11bf9cd560 100644 --- a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java +++ b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java @@ -41,6 +41,10 @@ import org.apache.tomcat.util.buf.HexUtils; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.security.ConcurrentMessageDigest; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterDigestAuthenticatorPerformance { private static String USER = "user"; diff --git a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java index 2c3112ca69..9e0ea4c29e 100644 --- a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java +++ b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java @@ -19,6 +19,9 @@ package org.apache.tomcat.unittest; import java.util.function.IntConsumer; import java.util.function.Supplier; +/* + * Support class for threaded performance tests. + */ public class TesterThreadedPerformance { private final int threadCount; diff --git a/test/org/apache/tomcat/util/bcel/TesterPerformance.java b/test/org/apache/tomcat/util/bcel/TesterPerformance.java index b3400dc7d8..945637192c 100644 --- a/test/org/apache/tomcat/util/bcel/TesterPerformance.java +++ b/test/org/apache/tomcat/util/bcel/TesterPerformance.java @@ -32,6 +32,12 @@ import org.apache.tomcat.Jar; import org.apache.tomcat.util.bcel.classfile.ClassParser; import org.apache.tomcat.util.scan.JarFactory; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + * + * The test also requires that the Jira lib directory has been extracted from a Jira install and copied to /tmp. + */ public class TesterPerformance { private static final String JAR_LOCATION = "/tmp/jira-libs"; diff --git a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java index 76c5d398fa..5504bde4ae 100644 --- a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java @@ -21,6 +21,10 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to t
(tomcat) branch main updated (72430c2072 -> d24302cb12)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git from 72430c2072 Add license new 0b72ad2b00 Refactor absolute performance tests so they do not run by default new 7a03eb4970 Add additional comment to existing absolute performance tests new 32a57904e4 Refactor so these relative performance tests generate pass/fail results new a574b5af78 Add additional comment to this relative performance test new 6be9e259d6 Comment this absolute performance test with an upper limit new 7a2352969b This test is very timing sensitive. Add some test specific margins. new 8e05a017af Update the docs for running the tests new d24302cb12 Don't test lazy vs full as they can be quite close The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: BUILDING.txt | 17 ++-- ...a => TesterCompositeELResolverPerformance.java} | 6 ++- .../jakarta/el/TesterImportHandlerPerformance.java | 4 ++ ...ance.java => TesterHttpServletPerformance.java} | 6 +-- ...esterScopedAttributeELResolverPerformance.java} | 6 ++- .../TesterContainerProviderPerformance.java| 4 ++ .../TesterDigestAuthenticatorPerformance.java | 4 ++ .../connector/TestResponsePerformance.java | 8 +++- ...formance.java => TesterRequestPerformance.java} | 6 ++- ...> TesterApplicationHttpRequestPerformance.java} | 6 ++- ...> TesterDefaultInstanceManagerPerformance.java} | 9 +++-- .../catalina/mapper/TestMapperPerformance.java | 3 ++ ... TesterAbstractFileResourceSetPerformance.java} | 6 ++- .../apache/el/parser/TestELParserPerformance.java | 10 + ...e.java => TesterTagHandlerPoolPerformance.java} | 7 +++- .../juli/TestOneLineFormatterPerformance.java | 31 +- ...> TesterOneLineFormatterMillisPerformance.java} | 6 ++- .../tomcat/unittest/TesterThreadedPerformance.java | 3 ++ .../apache/tomcat/util/bcel/TesterPerformance.java | 6 +++ .../util/buf/TestCharsetCachePerformance.java | 31 +++--- .../tomcat/util/http/TesterCookiesPerformance.java | 4 ++ ...va => TesterFastHttpDateFormatPerformance.java} | 6 ++- .../util/http/TesterParametersPerformance.java | 4 ++ java => TesterConnectionLimitPerformance.java} | 6 ++- .../server/TestAsyncMessagesPerformance.java | 47 +- 25 files changed, 190 insertions(+), 56 deletions(-) rename test/jakarta/el/{TestCompositeELResolverPerformance.java => TesterCompositeELResolverPerformance.java} (88%) rename test/jakarta/servlet/http/{TestHttpServletPerformance.java => TesterHttpServletPerformance.java} (90%) rename test/jakarta/servlet/jsp/el/{TestScopedAttributeELResolverPerformance.java => TesterScopedAttributeELResolverPerformance.java} (87%) rename test/org/apache/catalina/connector/{TestRequestPerformance.java => TesterRequestPerformance.java} (87%) rename test/org/apache/catalina/core/{TestApplicationHttpRequestPerformance.java => TesterApplicationHttpRequestPerformance.java} (88%) rename test/org/apache/catalina/core/{TestDefaultInstanceManagerPerformance.java => TesterDefaultInstanceManagerPerformance.java} (92%) rename test/org/apache/catalina/webresources/{TestAbstractFileResourceSetPerformance.java => TesterAbstractFileResourceSetPerformance.java} (93%) rename test/org/apache/jasper/runtime/{TestTagHandlerPoolPerformance.java => TesterTagHandlerPoolPerformance.java} (92%) rename test/org/apache/juli/{TestOneLineFormatterMillisPerformance.java => TesterOneLineFormatterMillisPerformance.java} (92%) rename test/org/apache/tomcat/util/http/{TestFastHttpDateFormatPerformance.java => TesterFastHttpDateFormatPerformance.java} (89%) rename test/org/apache/tomcat/websocket/{TestConnectionLimitPerformance.java => TesterConnectionLimitPerformance.java} (93%) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/08: Refactor absolute performance tests so they do not run by default
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 0b72ad2b00207195441fb4bb9686c940eda32945 Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:19 2024 + Refactor absolute performance tests so they do not run by default Absolute performance tests report the time taken to complete a series of actions. They cannot fail therefore do not run them as part of a standard test run. These tests are excluded by naming them Tester... --- ...erformance.java => TesterCompositeELResolverPerformance.java} | 6 +- ...ServletPerformance.java => TesterHttpServletPerformance.java} | 6 +++--- ...ance.java => TesterScopedAttributeELResolverPerformance.java} | 6 +- ...TestRequestPerformance.java => TesterRequestPerformance.java} | 6 +- ...ormance.java => TesterApplicationHttpRequestPerformance.java} | 6 +- ...ormance.java => TesterDefaultInstanceManagerPerformance.java} | 9 + ...rmance.java => TesterAbstractFileResourceSetPerformance.java} | 6 +- ...PoolPerformance.java => TesterTagHandlerPoolPerformance.java} | 7 +-- ...ormance.java => TesterOneLineFormatterMillisPerformance.java} | 6 +- ...Performance.java => TesterFastHttpDateFormatPerformance.java} | 6 +- ...mitPerformance.java => TesterConnectionLimitPerformance.java} | 6 +- 11 files changed, 53 insertions(+), 17 deletions(-) diff --git a/test/jakarta/el/TestCompositeELResolverPerformance.java b/test/jakarta/el/TesterCompositeELResolverPerformance.java similarity index 88% rename from test/jakarta/el/TestCompositeELResolverPerformance.java rename to test/jakarta/el/TesterCompositeELResolverPerformance.java index f7974dd481..e974b979dd 100644 --- a/test/jakarta/el/TestCompositeELResolverPerformance.java +++ b/test/jakarta/el/TesterCompositeELResolverPerformance.java @@ -18,7 +18,11 @@ package jakarta.el; import org.junit.Test; -public class TestCompositeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterCompositeELResolverPerformance { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=68119 diff --git a/test/jakarta/servlet/http/TestHttpServletPerformance.java b/test/jakarta/servlet/http/TesterHttpServletPerformance.java similarity index 90% rename from test/jakarta/servlet/http/TestHttpServletPerformance.java rename to test/jakarta/servlet/http/TesterHttpServletPerformance.java index 98526de898..aeb5cc4ca4 100644 --- a/test/jakarta/servlet/http/TestHttpServletPerformance.java +++ b/test/jakarta/servlet/http/TesterHttpServletPerformance.java @@ -27,10 +27,10 @@ import org.apache.catalina.filters.TesterHttpServletResponse; /* - * Note: Class name chosen so it matches *Performance.java and can be excluded - * from test runs along with other performance tests. + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... */ -public class TestHttpServletPerformance { +public class TesterHttpServletPerformance { @Test public void testDoOptions() throws IOException, ServletException{ diff --git a/test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java b/test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java similarity index 87% rename from test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java rename to test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java index 341d44d45c..3b37ef1ca2 100644 --- a/test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java +++ b/test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java @@ -25,7 +25,11 @@ import jakarta.servlet.jsp.TesterPageContext; import org.junit.Test; -public class TestScopedAttributeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterScopedAttributeELResolverPerformance { /* * With the caching of NotFound responses this test takes ~20ms. Without the diff --git a/test/org/apache/catalina/connector/TestRequestPerformance.java b/test/org/apache/catalina/connector/TesterRequestPerformance.java similarity index 87% rename from test/org/apache/catalina/connector/TestRequestPerformance.java rename to test/org/apache/catalina/connector/TesterRequestPerformance.java index 81a00829ce..42ec455051 100644 --- a/test/org/apache/catalina/connector/TestRequestPerformance.java +++ b/test/org/apache/catalina/connector/TesterRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.tomcat.unittest.
(tomcat) 07/08: Update the docs for running the tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 8e05a017af74642068b56cadec25f93ebbf75dad Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:41 2024 + Update the docs for running the tests --- BUILDING.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index 0acef652a1..d4e248b7b0 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -492,9 +492,20 @@ NOTE: Cobertura is licensed under GPL v2 with parts of it being under (such as a developer may use day to day) assuming no other resource hungry processes are running. -These assumptions are not always true (e.g. on CI systems running in a -virtual machine) so the performance tests may be deactivated by using the -following property: +Performance tests may be an absolute test (how long to complete a number +of iterations of an operation or set of operations) or may be a relative +test (how long two or more different approaches take to generate the same +result). The absolute tests may be destructive in that they run until the +system runs out of resources. + +Where there is no benefit in running an absolute performance test as part +of a standard test run, the test will be excluded by naming it +Tester*Performance.java. + +The relative tests are included as part of a standard test run however, +where the assumptions made about host capabilities are not true (e.g. on +CI systems running in virtual machine) the tests may be deactivated by +using the following property: test.excludePerformance=true - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 05/08: Comment this absolute performance test with an upper limit
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 6be9e259d678f85604c561cf45f8d970d6139075 Author: Mark Thomas AuthorDate: Mon Jan 8 12:09:29 2024 + Comment this absolute performance test with an upper limit Since there is an upper limit this test can pass/fail so it is included in the standard test run. --- test/org/apache/catalina/mapper/TestMapperPerformance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/org/apache/catalina/mapper/TestMapperPerformance.java b/test/org/apache/catalina/mapper/TestMapperPerformance.java index 606794397f..4b4feb8f81 100644 --- a/test/org/apache/catalina/mapper/TestMapperPerformance.java +++ b/test/org/apache/catalina/mapper/TestMapperPerformance.java @@ -21,6 +21,9 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test with an upper limit. Therefore it is executed as part of a standard test run. + */ public class TestMapperPerformance extends TestMapper { @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 08/08: Don't test lazy vs full as they can be quite close
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit d24302cb1218f66fd59192091f8bccda1acf4ebe Author: Mark Thomas AuthorDate: Mon Jan 8 13:46:16 2024 + Don't test lazy vs full as they can be quite close --- test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index f17098488e..0a0646db39 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -37,7 +37,8 @@ public class TestCharsetCachePerformance { Assert.assertTrue("No cache was faster than full cache", timeFull < timeNone); Assert.assertTrue("No cache was faster than lazy cache", timeLazy < timeNone); -Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); +// On average full cache is faster than lazy cache but they are close enough the test will fail sometimes +//Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 06/08: This test is very timing sensitive. Add some test specific margins.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 7a2352969b484212fa230c5df97c9bd64e24d886 Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:31 2024 + This test is very timing sensitive. Add some test specific margins. The current margins are based on local testing and reports on the dev list. They may need to be relaxed further or if the results are very inconsistent between systems it may need to be disabled by default. --- .../server/TestAsyncMessagesPerformance.java | 47 +- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index c169f61a60..5304bee2ca 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -36,6 +36,11 @@ import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.websocket.TesterAsyncTiming; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; +/* + * This test is very timing sensitive. Any failures need to be checked to see if the thresholds just need adjusting to + * support a wider range of platforms and/or Java versions or if the failure is an indication of a performance drop in + * the WebSocket implementation. + */ public class TestAsyncMessagesPerformance extends TomcatBaseTest { @Test @@ -69,11 +74,20 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { private long lastMessage = 0; private int sequence = 0; private int count = 0; +private long seqZeroTimingFailureCount = 0; +private long seqOneTimingFailureCount = 0; +private long seqTwoTimingFailureCount = 0; + private CountDownLatch latch = new CountDownLatch(1); private volatile boolean fail = false; @Override public void onMessage(ByteBuffer message, boolean last) { +// Expected received data is: +// 1 * 16k message in 2 * 8k chunks +// 1 * 4k message in 1 * 4k chunk +// 50 ms pause +// loop if (lastMessage == 0) { // First message. Don't check sequence++; @@ -87,34 +101,36 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ0: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } if (diff < 4000) { -System.out.println("Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ0: Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); +seqZeroTimingFailureCount++; } } else if (sequence == 1) { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ1: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 2* 8k chunks of 16k message expected to be less than 0.5ms if (diff > 50) { -System.out.println("Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ1: Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); +seqOneTimingFailureCount++; } } else if (sequence == 2) { sequence = 0; if (message.capacity() != 4096) { System.out.println( -"Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ2: Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 16k message and 4k message expected to be less than 0.5ms
(tomcat) 03/08: Refactor so these relative performance tests generate pass/fail results
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 32a57904e46ce3f02efc532c4293e3487f3c5f7c Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:21 2024 + Refactor so these relative performance tests generate pass/fail results --- .../apache/el/parser/TestELParserPerformance.java | 10 +++ .../juli/TestOneLineFormatterPerformance.java | 31 +++--- .../util/buf/TestCharsetCachePerformance.java | 30 ++--- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/test/org/apache/el/parser/TestELParserPerformance.java b/test/org/apache/el/parser/TestELParserPerformance.java index de2aa9d1e0..eb860f4be9 100644 --- a/test/org/apache/el/parser/TestELParserPerformance.java +++ b/test/org/apache/el/parser/TestELParserPerformance.java @@ -20,10 +20,14 @@ import java.io.StringReader; import jakarta.el.ELBaseTest; +import org.junit.Assert; import org.junit.Test; import org.apache.tomcat.util.collections.SynchronizedStack; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestELParserPerformance extends ELBaseTest { /* @@ -48,6 +52,8 @@ public class TestELParserPerformance extends ELBaseTest { final int runs = 20; final int parseIterations = 1; +long reinitTotalTime = 0; +long newTotalTime = 0; for (int j = 0; j < runs; j ++) { long start = System.nanoTime(); @@ -64,6 +70,7 @@ public class TestELParserPerformance extends ELBaseTest { stack.push(parser); } long end = System.nanoTime(); +reinitTotalTime += (end - start); System.out.println(parseIterations + " iterations using ELParser.ReInit(...) took " + (end - start) + "ns"); @@ -76,9 +83,12 @@ public class TestELParserPerformance extends ELBaseTest { parser.CompositeExpression(); } long end = System.nanoTime(); +newTotalTime += (end - start); System.out.println(parseIterations + " iterations usingnew ELParser(...) took " + (end - start) + "ns"); } + +Assert.assertTrue("Using new ElParser() was faster then using ELParser.ReInit", reinitTotalTime < newTotalTime); } } diff --git a/test/org/apache/juli/TestOneLineFormatterPerformance.java b/test/org/apache/juli/TestOneLineFormatterPerformance.java index 54b1e33ebd..a90ebd6529 100644 --- a/test/org/apache/juli/TestOneLineFormatterPerformance.java +++ b/test/org/apache/juli/TestOneLineFormatterPerformance.java @@ -16,6 +16,7 @@ */ package org.apache.juli; +import org.junit.Assert; import org.junit.Test; /** @@ -28,19 +29,29 @@ public class TestOneLineFormatterPerformance { @Test public void testDateFormat() throws Exception { +DateFormat stringFormatImpl = new StringFormatImpl(); +long stringFormatImplTime = doTestDateFormat(stringFormatImpl); + +DateFormat dateFormatCacheImpl = new DateFormatCacheImpl(); +long dateFormatCacheImplTime = doTestDateFormat(dateFormatCacheImpl); + +Assert.assertTrue("String#format was faster that DateFormatCache", +dateFormatCacheImplTime < stringFormatImplTime); +} + + +private long doTestDateFormat(DateFormat df) { int iters = 100; -DateFormat[] dfs = new DateFormat[] { new StringFormatImpl(), new DateFormatCacheImpl() }; - -for (DateFormat df : dfs) { -long start = System.nanoTime(); -for (int i = 0; i < iters; i++) { -df.format(System.nanoTime()); -} -long end = System.nanoTime(); -System.out.println( -"Impl: [" + df.getClass().getName() + "] took [" + (end-start) + "] ns"); + +long start = System.nanoTime(); +for (int i = 0; i < iters; i++) { +df.format(System.nanoTime()); } +long end = System.nanoTime(); +System.out.println( +"Impl: [" + df.getClass().getName() + "] took [" + (end - start) + "] ns"); +return end - start; } diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index 2ad8f7f142..f17098488e 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -21,29 +21,27 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; +import org.junit.Assert; import org.junit.Test; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestCharsetCachePerformance { @Test -public void testNoC
(tomcat) 04/08: Add additional comment to this relative performance test
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit a574b5af78fb54ab934bca32bac7757be230c0a4 Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:41 2024 + Add additional comment to this relative performance test --- test/org/apache/catalina/connector/TestResponsePerformance.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestResponsePerformance.java b/test/org/apache/catalina/connector/TestResponsePerformance.java index 100a20b38f..62c2e1db92 100644 --- a/test/org/apache/catalina/connector/TestResponsePerformance.java +++ b/test/org/apache/catalina/connector/TestResponsePerformance.java @@ -24,6 +24,10 @@ import org.junit.Test; import org.apache.catalina.startup.LoggingBaseTest; import org.apache.tomcat.unittest.TesterRequest; +/* + * This is a relative performance test so it remains part of the standard test run. If the test fails then we need to + * looking at why and possibly disable/remove the homebrew approach for some OS/Java combinations. + */ public class TestResponsePerformance extends LoggingBaseTest { private static final int ITERATIONS = 100; @@ -38,8 +42,8 @@ public class TestResponsePerformance extends LoggingBaseTest { doHomebrew(resp); doUri(); -// Note: With Java 11 the 'homebrew' approach is consistently 3 to 4 -// times faster on both MacOS and Linux +// Note: With Java 11 the 'homebrew' approach is consistently 3-4 times faster on both MacOS (Intel) and Linux +// With Java 22 EA the 'homebrew' approach is consistently a little over 2x faster on MacOS (M1) // To allow for timing differences between runs, a "best of n" approach // is taken for this test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/08: Add additional comment to existing absolute performance tests
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 commit c9e9751622aa923cad73ff0fcf83aacb0ac78f10 Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:53 2024 + Add additional comment to existing absolute performance tests --- test/jakarta/el/TesterImportHandlerPerformance.java | 4 test/jakarta/websocket/TesterContainerProviderPerformance.java | 4 .../authenticator/TesterDigestAuthenticatorPerformance.java | 4 test/org/apache/tomcat/unittest/TesterThreadedPerformance.java | 3 +++ test/org/apache/tomcat/util/bcel/TesterPerformance.java | 6 ++ test/org/apache/tomcat/util/http/TesterCookiesPerformance.java | 4 test/org/apache/tomcat/util/http/TesterParametersPerformance.java | 4 7 files changed, 29 insertions(+) diff --git a/test/jakarta/el/TesterImportHandlerPerformance.java b/test/jakarta/el/TesterImportHandlerPerformance.java index c2c267c851..77e39e7624 100644 --- a/test/jakarta/el/TesterImportHandlerPerformance.java +++ b/test/jakarta/el/TesterImportHandlerPerformance.java @@ -18,6 +18,10 @@ package jakarta.el; import org.junit.Test; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterImportHandlerPerformance { /* diff --git a/test/jakarta/websocket/TesterContainerProviderPerformance.java b/test/jakarta/websocket/TesterContainerProviderPerformance.java index a3c8a87f46..0e2c7181b3 100644 --- a/test/jakarta/websocket/TesterContainerProviderPerformance.java +++ b/test/jakarta/websocket/TesterContainerProviderPerformance.java @@ -23,6 +23,10 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterThreadedPerformance; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterContainerProviderPerformance { @Test diff --git a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java index ae66487ec0..1d95b0ba05 100644 --- a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java +++ b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java @@ -41,6 +41,10 @@ import org.apache.tomcat.util.buf.HexUtils; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.security.ConcurrentMessageDigest; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterDigestAuthenticatorPerformance { private static String USER = "user"; diff --git a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java index 2c3112ca69..9e0ea4c29e 100644 --- a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java +++ b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java @@ -19,6 +19,9 @@ package org.apache.tomcat.unittest; import java.util.function.IntConsumer; import java.util.function.Supplier; +/* + * Support class for threaded performance tests. + */ public class TesterThreadedPerformance { private final int threadCount; diff --git a/test/org/apache/tomcat/util/bcel/TesterPerformance.java b/test/org/apache/tomcat/util/bcel/TesterPerformance.java index 9319c47e2e..de785576a5 100644 --- a/test/org/apache/tomcat/util/bcel/TesterPerformance.java +++ b/test/org/apache/tomcat/util/bcel/TesterPerformance.java @@ -31,6 +31,12 @@ import org.apache.tomcat.Jar; import org.apache.tomcat.util.bcel.classfile.ClassParser; import org.apache.tomcat.util.scan.JarFactory; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + * + * The test also requires that the Jira lib directory has been extracted from a Jira install and copied to /tmp. + */ public class TesterPerformance { private static final String JAR_LOCATION = "/tmp/jira-libs"; diff --git a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java index 76c5d398fa..5504bde4ae 100644 --- a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java @@ -21,6 +21,10 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to
(tomcat) 06/08: This test is very timing sensitive. Add some test specific margins.
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 commit e506ebe20a7a1aaf43d526a4f87a791b8015bd0a Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:31 2024 + This test is very timing sensitive. Add some test specific margins. The current margins are based on local testing and reports on the dev list. They may need to be relaxed further or if the results are very inconsistent between systems it may need to be disabled by default. --- .../server/TestAsyncMessagesPerformance.java | 47 +- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index c169f61a60..5304bee2ca 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -36,6 +36,11 @@ import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.websocket.TesterAsyncTiming; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; +/* + * This test is very timing sensitive. Any failures need to be checked to see if the thresholds just need adjusting to + * support a wider range of platforms and/or Java versions or if the failure is an indication of a performance drop in + * the WebSocket implementation. + */ public class TestAsyncMessagesPerformance extends TomcatBaseTest { @Test @@ -69,11 +74,20 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { private long lastMessage = 0; private int sequence = 0; private int count = 0; +private long seqZeroTimingFailureCount = 0; +private long seqOneTimingFailureCount = 0; +private long seqTwoTimingFailureCount = 0; + private CountDownLatch latch = new CountDownLatch(1); private volatile boolean fail = false; @Override public void onMessage(ByteBuffer message, boolean last) { +// Expected received data is: +// 1 * 16k message in 2 * 8k chunks +// 1 * 4k message in 1 * 4k chunk +// 50 ms pause +// loop if (lastMessage == 0) { // First message. Don't check sequence++; @@ -87,34 +101,36 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ0: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } if (diff < 4000) { -System.out.println("Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ0: Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); +seqZeroTimingFailureCount++; } } else if (sequence == 1) { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ1: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 2* 8k chunks of 16k message expected to be less than 0.5ms if (diff > 50) { -System.out.println("Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ1: Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); +seqOneTimingFailureCount++; } } else if (sequence == 2) { sequence = 0; if (message.capacity() != 4096) { System.out.println( -"Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ2: Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 16k message and 4k message expected to be less than 0.5ms
(tomcat) 08/08: Don't test lazy vs full as they can be quite close
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 commit 3d31aab77eceba6c3efcc13d39a4d496f7bd2058 Author: Mark Thomas AuthorDate: Mon Jan 8 13:46:16 2024 + Don't test lazy vs full as they can be quite close --- test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index f17098488e..0a0646db39 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -37,7 +37,8 @@ public class TestCharsetCachePerformance { Assert.assertTrue("No cache was faster than full cache", timeFull < timeNone); Assert.assertTrue("No cache was faster than lazy cache", timeLazy < timeNone); -Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); +// On average full cache is faster than lazy cache but they are close enough the test will fail sometimes +//Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 07/08: Update the docs for running the tests
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 commit bb1e1bbfed0802b73ac9f30130b02f6a3cec4a75 Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:41 2024 + Update the docs for running the tests --- BUILDING.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index 0acef652a1..d4e248b7b0 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -492,9 +492,20 @@ NOTE: Cobertura is licensed under GPL v2 with parts of it being under (such as a developer may use day to day) assuming no other resource hungry processes are running. -These assumptions are not always true (e.g. on CI systems running in a -virtual machine) so the performance tests may be deactivated by using the -following property: +Performance tests may be an absolute test (how long to complete a number +of iterations of an operation or set of operations) or may be a relative +test (how long two or more different approaches take to generate the same +result). The absolute tests may be destructive in that they run until the +system runs out of resources. + +Where there is no benefit in running an absolute performance test as part +of a standard test run, the test will be excluded by naming it +Tester*Performance.java. + +The relative tests are included as part of a standard test run however, +where the assumptions made about host capabilities are not true (e.g. on +CI systems running in virtual machine) the tests may be deactivated by +using the following property: test.excludePerformance=true - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 03/08: Refactor so these relative performance tests generate pass/fail results
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 commit cc1a5444981b8ae7c97c19a9ac136e83ae1192d4 Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:21 2024 + Refactor so these relative performance tests generate pass/fail results --- .../apache/el/parser/TestELParserPerformance.java | 10 +++ .../juli/TestOneLineFormatterPerformance.java | 31 +++--- .../util/buf/TestCharsetCachePerformance.java | 30 ++--- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/test/org/apache/el/parser/TestELParserPerformance.java b/test/org/apache/el/parser/TestELParserPerformance.java index f4d90e7f9e..6a282cded6 100644 --- a/test/org/apache/el/parser/TestELParserPerformance.java +++ b/test/org/apache/el/parser/TestELParserPerformance.java @@ -18,10 +18,14 @@ package org.apache.el.parser; import java.io.StringReader; +import org.junit.Assert; import org.junit.Test; import org.apache.tomcat.util.collections.SynchronizedStack; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestELParserPerformance { /* @@ -46,6 +50,8 @@ public class TestELParserPerformance { final int runs = 20; final int parseIterations = 1; +long reinitTotalTime = 0; +long newTotalTime = 0; for (int j = 0; j < runs; j ++) { long start = System.nanoTime(); @@ -62,6 +68,7 @@ public class TestELParserPerformance { stack.push(parser); } long end = System.nanoTime(); +reinitTotalTime += (end - start); System.out.println(parseIterations + " iterations using ELParser.ReInit(...) took " + (end - start) + "ns"); @@ -74,9 +81,12 @@ public class TestELParserPerformance { parser.CompositeExpression(); } long end = System.nanoTime(); +newTotalTime += (end - start); System.out.println(parseIterations + " iterations usingnew ELParser(...) took " + (end - start) + "ns"); } + +Assert.assertTrue("Using new ElParser() was faster then using ELParser.ReInit", reinitTotalTime < newTotalTime); } } diff --git a/test/org/apache/juli/TestOneLineFormatterPerformance.java b/test/org/apache/juli/TestOneLineFormatterPerformance.java index 54b1e33ebd..a90ebd6529 100644 --- a/test/org/apache/juli/TestOneLineFormatterPerformance.java +++ b/test/org/apache/juli/TestOneLineFormatterPerformance.java @@ -16,6 +16,7 @@ */ package org.apache.juli; +import org.junit.Assert; import org.junit.Test; /** @@ -28,19 +29,29 @@ public class TestOneLineFormatterPerformance { @Test public void testDateFormat() throws Exception { +DateFormat stringFormatImpl = new StringFormatImpl(); +long stringFormatImplTime = doTestDateFormat(stringFormatImpl); + +DateFormat dateFormatCacheImpl = new DateFormatCacheImpl(); +long dateFormatCacheImplTime = doTestDateFormat(dateFormatCacheImpl); + +Assert.assertTrue("String#format was faster that DateFormatCache", +dateFormatCacheImplTime < stringFormatImplTime); +} + + +private long doTestDateFormat(DateFormat df) { int iters = 100; -DateFormat[] dfs = new DateFormat[] { new StringFormatImpl(), new DateFormatCacheImpl() }; - -for (DateFormat df : dfs) { -long start = System.nanoTime(); -for (int i = 0; i < iters; i++) { -df.format(System.nanoTime()); -} -long end = System.nanoTime(); -System.out.println( -"Impl: [" + df.getClass().getName() + "] took [" + (end-start) + "] ns"); + +long start = System.nanoTime(); +for (int i = 0; i < iters; i++) { +df.format(System.nanoTime()); } +long end = System.nanoTime(); +System.out.println( +"Impl: [" + df.getClass().getName() + "] took [" + (end - start) + "] ns"); +return end - start; } diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index 2ad8f7f142..f17098488e 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -21,29 +21,27 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; +import org.junit.Assert; import org.junit.Test; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestCharsetCachePerformance { @Test -public void testNoCsCache() throws Exception { -doTest(new NoCsCache()); -} - - -
(tomcat) branch 10.1.x updated (2089597da1 -> 3d31aab77e)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 2089597da1 Cleanup connector names in json new 366587e51b Refactor absolute performance tests so they do not run by default new c9e9751622 Add additional comment to existing absolute performance tests new cc1a544498 Refactor so these relative performance tests generate pass/fail results new b655e6e4e6 Add additional comment to this relative performance test new f7bea44391 Comment this absolute performance test with an upper limit new e506ebe20a This test is very timing sensitive. Add some test specific margins. new bb1e1bbfed Update the docs for running the tests new 3d31aab77e Don't test lazy vs full as they can be quite close The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: BUILDING.txt | 17 ++-- ...a => TesterCompositeELResolverPerformance.java} | 6 ++- .../jakarta/el/TesterImportHandlerPerformance.java | 4 ++ ...ance.java => TesterHttpServletPerformance.java} | 6 +-- ...esterScopedAttributeELResolverPerformance.java} | 6 ++- .../TesterContainerProviderPerformance.java| 4 ++ .../TesterDigestAuthenticatorPerformance.java | 4 ++ .../connector/TestResponsePerformance.java | 8 +++- ...formance.java => TesterRequestPerformance.java} | 6 ++- ...> TesterApplicationHttpRequestPerformance.java} | 6 ++- ...> TesterDefaultInstanceManagerPerformance.java} | 9 +++-- .../catalina/mapper/TestMapperPerformance.java | 3 ++ ... TesterAbstractFileResourceSetPerformance.java} | 6 ++- .../apache/el/parser/TestELParserPerformance.java | 10 + ...e.java => TesterTagHandlerPoolPerformance.java} | 7 +++- .../juli/TestOneLineFormatterPerformance.java | 31 +- ...> TesterOneLineFormatterMillisPerformance.java} | 6 ++- .../tomcat/unittest/TesterThreadedPerformance.java | 3 ++ .../apache/tomcat/util/bcel/TesterPerformance.java | 6 +++ .../util/buf/TestCharsetCachePerformance.java | 31 +++--- .../tomcat/util/http/TesterCookiesPerformance.java | 4 ++ ...va => TesterFastHttpDateFormatPerformance.java} | 6 ++- .../util/http/TesterParametersPerformance.java | 4 ++ java => TesterConnectionLimitPerformance.java} | 6 ++- .../server/TestAsyncMessagesPerformance.java | 47 +- 25 files changed, 190 insertions(+), 56 deletions(-) rename test/jakarta/el/{TestCompositeELResolverPerformance.java => TesterCompositeELResolverPerformance.java} (88%) rename test/jakarta/servlet/http/{TestHttpServletPerformance.java => TesterHttpServletPerformance.java} (90%) rename test/jakarta/servlet/jsp/el/{TestScopedAttributeELResolverPerformance.java => TesterScopedAttributeELResolverPerformance.java} (87%) rename test/org/apache/catalina/connector/{TestRequestPerformance.java => TesterRequestPerformance.java} (87%) rename test/org/apache/catalina/core/{TestApplicationHttpRequestPerformance.java => TesterApplicationHttpRequestPerformance.java} (88%) rename test/org/apache/catalina/core/{TestDefaultInstanceManagerPerformance.java => TesterDefaultInstanceManagerPerformance.java} (92%) rename test/org/apache/catalina/webresources/{TestAbstractFileResourceSetPerformance.java => TesterAbstractFileResourceSetPerformance.java} (93%) rename test/org/apache/jasper/runtime/{TestTagHandlerPoolPerformance.java => TesterTagHandlerPoolPerformance.java} (92%) rename test/org/apache/juli/{TestOneLineFormatterMillisPerformance.java => TesterOneLineFormatterMillisPerformance.java} (92%) rename test/org/apache/tomcat/util/http/{TestFastHttpDateFormatPerformance.java => TesterFastHttpDateFormatPerformance.java} (89%) rename test/org/apache/tomcat/websocket/{TestConnectionLimitPerformance.java => TesterConnectionLimitPerformance.java} (93%) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 04/08: Add additional comment to this relative performance test
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 commit b655e6e4e62714404329f8cefc86144b4c394654 Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:41 2024 + Add additional comment to this relative performance test --- test/org/apache/catalina/connector/TestResponsePerformance.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/org/apache/catalina/connector/TestResponsePerformance.java b/test/org/apache/catalina/connector/TestResponsePerformance.java index 044fcfd3da..364829653f 100644 --- a/test/org/apache/catalina/connector/TestResponsePerformance.java +++ b/test/org/apache/catalina/connector/TestResponsePerformance.java @@ -24,6 +24,10 @@ import org.junit.Test; import org.apache.catalina.startup.LoggingBaseTest; import org.apache.tomcat.unittest.TesterRequest; +/* + * This is a relative performance test so it remains part of the standard test run. If the test fails then we need to + * looking at why and possibly disable/remove the homebrew approach for some OS/Java combinations. + */ public class TestResponsePerformance extends LoggingBaseTest { private static final int ITERATIONS = 100; @@ -38,8 +42,8 @@ public class TestResponsePerformance extends LoggingBaseTest { doHomebrew(resp); doUri(); -// Note: With Java 11 the 'homebrew' approach is consistently 3 to 4 -// times faster on both MacOS and Linux +// Note: With Java 11 the 'homebrew' approach is consistently 3-4 times faster on both MacOS (Intel) and Linux +// With Java 22 EA the 'homebrew' approach is consistently a little over 2x faster on MacOS (M1) // To allow for timing differences between runs, a "best of n" approach // is taken for this test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 05/08: Comment this absolute performance test with an upper limit
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 commit f7bea443915ade364fa222fb5847cba1a0909ac1 Author: Mark Thomas AuthorDate: Mon Jan 8 12:09:29 2024 + Comment this absolute performance test with an upper limit Since there is an upper limit this test can pass/fail so it is included in the standard test run. --- test/org/apache/catalina/mapper/TestMapperPerformance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/org/apache/catalina/mapper/TestMapperPerformance.java b/test/org/apache/catalina/mapper/TestMapperPerformance.java index 606794397f..4b4feb8f81 100644 --- a/test/org/apache/catalina/mapper/TestMapperPerformance.java +++ b/test/org/apache/catalina/mapper/TestMapperPerformance.java @@ -21,6 +21,9 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test with an upper limit. Therefore it is executed as part of a standard test run. + */ public class TestMapperPerformance extends TestMapper { @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/08: Refactor absolute performance tests so they do not run by default
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 commit 366587e51bf2ddedbd9f90dbc224ebfc501daea9 Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:19 2024 + Refactor absolute performance tests so they do not run by default Absolute performance tests report the time taken to complete a series of actions. They cannot fail therefore do not run them as part of a standard test run. These tests are excluded by naming them Tester... --- ...erformance.java => TesterCompositeELResolverPerformance.java} | 6 +- ...ServletPerformance.java => TesterHttpServletPerformance.java} | 6 +++--- ...ance.java => TesterScopedAttributeELResolverPerformance.java} | 6 +- ...TestRequestPerformance.java => TesterRequestPerformance.java} | 6 +- ...ormance.java => TesterApplicationHttpRequestPerformance.java} | 6 +- ...ormance.java => TesterDefaultInstanceManagerPerformance.java} | 9 + ...rmance.java => TesterAbstractFileResourceSetPerformance.java} | 6 +- ...PoolPerformance.java => TesterTagHandlerPoolPerformance.java} | 7 +-- ...ormance.java => TesterOneLineFormatterMillisPerformance.java} | 6 +- ...Performance.java => TesterFastHttpDateFormatPerformance.java} | 6 +- ...mitPerformance.java => TesterConnectionLimitPerformance.java} | 6 +- 11 files changed, 53 insertions(+), 17 deletions(-) diff --git a/test/jakarta/el/TestCompositeELResolverPerformance.java b/test/jakarta/el/TesterCompositeELResolverPerformance.java similarity index 88% rename from test/jakarta/el/TestCompositeELResolverPerformance.java rename to test/jakarta/el/TesterCompositeELResolverPerformance.java index f7974dd481..e974b979dd 100644 --- a/test/jakarta/el/TestCompositeELResolverPerformance.java +++ b/test/jakarta/el/TesterCompositeELResolverPerformance.java @@ -18,7 +18,11 @@ package jakarta.el; import org.junit.Test; -public class TestCompositeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterCompositeELResolverPerformance { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=68119 diff --git a/test/jakarta/servlet/http/TestHttpServletPerformance.java b/test/jakarta/servlet/http/TesterHttpServletPerformance.java similarity index 90% rename from test/jakarta/servlet/http/TestHttpServletPerformance.java rename to test/jakarta/servlet/http/TesterHttpServletPerformance.java index 98526de898..aeb5cc4ca4 100644 --- a/test/jakarta/servlet/http/TestHttpServletPerformance.java +++ b/test/jakarta/servlet/http/TesterHttpServletPerformance.java @@ -27,10 +27,10 @@ import org.apache.catalina.filters.TesterHttpServletResponse; /* - * Note: Class name chosen so it matches *Performance.java and can be excluded - * from test runs along with other performance tests. + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... */ -public class TestHttpServletPerformance { +public class TesterHttpServletPerformance { @Test public void testDoOptions() throws IOException, ServletException{ diff --git a/test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java b/test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java similarity index 87% rename from test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java rename to test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java index 341d44d45c..3b37ef1ca2 100644 --- a/test/jakarta/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java +++ b/test/jakarta/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java @@ -25,7 +25,11 @@ import jakarta.servlet.jsp.TesterPageContext; import org.junit.Test; -public class TestScopedAttributeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterScopedAttributeELResolverPerformance { /* * With the caching of NotFound responses this test takes ~20ms. Without the diff --git a/test/org/apache/catalina/connector/TestRequestPerformance.java b/test/org/apache/catalina/connector/TesterRequestPerformance.java similarity index 87% rename from test/org/apache/catalina/connector/TestRequestPerformance.java rename to test/org/apache/catalina/connector/TesterRequestPerformance.java index 81a00829ce..42ec455051 100644 --- a/test/org/apache/catalina/connector/TestRequestPerformance.java +++ b/test/org/apache/catalina/connector/TesterRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.tomcat.unittes
(tomcat) branch 9.0.x updated (7d3a116daf -> 02e01b80f3)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 7d3a116daf Cleanup connector names in json new dcad392264 Refactor absolute performance tests so they do not run by default new 4627204ed2 Add additional comment to existing absolute performance tests new aebc402308 Refactor so these relative performance tests generate pass/fail results new 4332382bb1 Add additional comment to this relative performance test new 5d04b80899 Comment this absolute performance test with an upper limit new 08d7da2c39 This test is very timing sensitive. Add some test specific margins. new f5213adc30 Update the docs for running the tests new 02e01b80f3 Don't test lazy vs full as they can be quite close The 8 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: BUILDING.txt | 17 ++-- ...a => TesterCompositeELResolverPerformance.java} | 6 ++- test/javax/el/TesterImportHandlerPerformance.java | 4 ++ ...esterScopedAttributeELResolverPerformance.java} | 6 ++- .../TesterContainerProviderPerformance.java| 4 ++ .../TesterDigestAuthenticatorPerformance.java | 4 ++ .../connector/TestResponsePerformance.java | 9 +++-- ...formance.java => TesterRequestPerformance.java} | 6 ++- ...> TesterApplicationHttpRequestPerformance.java} | 6 ++- ...> TesterDefaultInstanceManagerPerformance.java} | 9 +++-- .../catalina/mapper/TestMapperPerformance.java | 3 ++ ... TesterAbstractFileResourceSetPerformance.java} | 6 ++- .../apache/el/parser/TestELParserPerformance.java | 10 + ...e.java => TesterTagHandlerPoolPerformance.java} | 7 +++- .../juli/TestOneLineFormatterPerformance.java | 31 +- ...> TesterOneLineFormatterMillisPerformance.java} | 6 ++- .../tomcat/unittest/TesterThreadedPerformance.java | 3 ++ .../apache/tomcat/util/bcel/TesterPerformance.java | 6 +++ .../util/buf/TestCharsetCachePerformance.java | 31 +++--- .../tomcat/util/http/TesterCookiesPerformance.java | 4 ++ ...va => TesterFastHttpDateFormatPerformance.java} | 6 ++- .../util/http/TesterParametersPerformance.java | 4 ++ java => TesterConnectionLimitPerformance.java} | 6 ++- .../server/TestAsyncMessagesPerformance.java | 47 +- 24 files changed, 187 insertions(+), 54 deletions(-) rename test/javax/el/{TestCompositeELResolverPerformance.java => TesterCompositeELResolverPerformance.java} (88%) rename test/javax/servlet/jsp/el/{TestScopedAttributeELResolverPerformance.java => TesterScopedAttributeELResolverPerformance.java} (87%) rename test/org/apache/catalina/connector/{TestRequestPerformance.java => TesterRequestPerformance.java} (87%) rename test/org/apache/catalina/core/{TestApplicationHttpRequestPerformance.java => TesterApplicationHttpRequestPerformance.java} (88%) rename test/org/apache/catalina/core/{TestDefaultInstanceManagerPerformance.java => TesterDefaultInstanceManagerPerformance.java} (92%) rename test/org/apache/catalina/webresources/{TestAbstractFileResourceSetPerformance.java => TesterAbstractFileResourceSetPerformance.java} (93%) rename test/org/apache/jasper/runtime/{TestTagHandlerPoolPerformance.java => TesterTagHandlerPoolPerformance.java} (92%) rename test/org/apache/juli/{TestOneLineFormatterMillisPerformance.java => TesterOneLineFormatterMillisPerformance.java} (92%) rename test/org/apache/tomcat/util/http/{TestFastHttpDateFormatPerformance.java => TesterFastHttpDateFormatPerformance.java} (89%) rename test/org/apache/tomcat/websocket/{TestConnectionLimitPerformance.java => TesterConnectionLimitPerformance.java} (93%) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 03/08: Refactor so these relative performance tests generate pass/fail results
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit aebc402308129424590f32fa8b9f3285451d3033 Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:21 2024 + Refactor so these relative performance tests generate pass/fail results --- .../apache/el/parser/TestELParserPerformance.java | 10 +++ .../juli/TestOneLineFormatterPerformance.java | 31 +++--- .../util/buf/TestCharsetCachePerformance.java | 30 ++--- 3 files changed, 46 insertions(+), 25 deletions(-) diff --git a/test/org/apache/el/parser/TestELParserPerformance.java b/test/org/apache/el/parser/TestELParserPerformance.java index f4d90e7f9e..6a282cded6 100644 --- a/test/org/apache/el/parser/TestELParserPerformance.java +++ b/test/org/apache/el/parser/TestELParserPerformance.java @@ -18,10 +18,14 @@ package org.apache.el.parser; import java.io.StringReader; +import org.junit.Assert; import org.junit.Test; import org.apache.tomcat.util.collections.SynchronizedStack; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestELParserPerformance { /* @@ -46,6 +50,8 @@ public class TestELParserPerformance { final int runs = 20; final int parseIterations = 1; +long reinitTotalTime = 0; +long newTotalTime = 0; for (int j = 0; j < runs; j ++) { long start = System.nanoTime(); @@ -62,6 +68,7 @@ public class TestELParserPerformance { stack.push(parser); } long end = System.nanoTime(); +reinitTotalTime += (end - start); System.out.println(parseIterations + " iterations using ELParser.ReInit(...) took " + (end - start) + "ns"); @@ -74,9 +81,12 @@ public class TestELParserPerformance { parser.CompositeExpression(); } long end = System.nanoTime(); +newTotalTime += (end - start); System.out.println(parseIterations + " iterations usingnew ELParser(...) took " + (end - start) + "ns"); } + +Assert.assertTrue("Using new ElParser() was faster then using ELParser.ReInit", reinitTotalTime < newTotalTime); } } diff --git a/test/org/apache/juli/TestOneLineFormatterPerformance.java b/test/org/apache/juli/TestOneLineFormatterPerformance.java index 54b1e33ebd..a90ebd6529 100644 --- a/test/org/apache/juli/TestOneLineFormatterPerformance.java +++ b/test/org/apache/juli/TestOneLineFormatterPerformance.java @@ -16,6 +16,7 @@ */ package org.apache.juli; +import org.junit.Assert; import org.junit.Test; /** @@ -28,19 +29,29 @@ public class TestOneLineFormatterPerformance { @Test public void testDateFormat() throws Exception { +DateFormat stringFormatImpl = new StringFormatImpl(); +long stringFormatImplTime = doTestDateFormat(stringFormatImpl); + +DateFormat dateFormatCacheImpl = new DateFormatCacheImpl(); +long dateFormatCacheImplTime = doTestDateFormat(dateFormatCacheImpl); + +Assert.assertTrue("String#format was faster that DateFormatCache", +dateFormatCacheImplTime < stringFormatImplTime); +} + + +private long doTestDateFormat(DateFormat df) { int iters = 100; -DateFormat[] dfs = new DateFormat[] { new StringFormatImpl(), new DateFormatCacheImpl() }; - -for (DateFormat df : dfs) { -long start = System.nanoTime(); -for (int i = 0; i < iters; i++) { -df.format(System.nanoTime()); -} -long end = System.nanoTime(); -System.out.println( -"Impl: [" + df.getClass().getName() + "] took [" + (end-start) + "] ns"); + +long start = System.nanoTime(); +for (int i = 0; i < iters; i++) { +df.format(System.nanoTime()); } +long end = System.nanoTime(); +System.out.println( +"Impl: [" + df.getClass().getName() + "] took [" + (end - start) + "] ns"); +return end - start; } diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index 2ad8f7f142..f17098488e 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -21,29 +21,27 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; +import org.junit.Assert; import org.junit.Test; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestCharsetCachePerformance { @Test -public void testNoCsCache() throws Exception { -doTest(new NoCsCache()); -} - - -
(tomcat) 04/08: Add additional comment to this relative performance test
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 4332382bb11d86197bfce2e9ca14c75a3c433225 Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:41 2024 + Add additional comment to this relative performance test --- test/org/apache/catalina/connector/TestResponsePerformance.java | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/connector/TestResponsePerformance.java b/test/org/apache/catalina/connector/TestResponsePerformance.java index eb1236e80b..e88164c59a 100644 --- a/test/org/apache/catalina/connector/TestResponsePerformance.java +++ b/test/org/apache/catalina/connector/TestResponsePerformance.java @@ -24,6 +24,10 @@ import org.junit.Test; import org.apache.catalina.startup.LoggingBaseTest; import org.apache.tomcat.unittest.TesterRequest; +/* + * This is a relative performance test so it remains part of the standard test run. If the test fails then we need to + * looking at why and possibly disable/remove the homebrew approach for some OS/Java combinations. + */ public class TestResponsePerformance extends LoggingBaseTest { private static final int ITERATIONS = 10; @@ -38,9 +42,8 @@ public class TestResponsePerformance extends LoggingBaseTest { doHomebrew(resp); doUri(); -// Note: Java 9 on my OSX laptop consistently shows doUri() is faster -// than doHomebrew(). Worth a closer look for Tomcat 10 on the -// assumption it will require java 9 +// Note: With Java 11 the 'homebrew' approach is consistently 3-4 times faster on both MacOS (Intel) and Linux +// With Java 22 EA the 'homebrew' approach is consistently a little over 2x faster on MacOS (M1) // To allow for timing differences between runs, a "best of n" approach // is taken for this test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 07/08: Update the docs for running the tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit f5213adc3069f09c609ae602efa01adb7eca6b60 Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:41 2024 + Update the docs for running the tests --- BUILDING.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index 5e16755e96..4fd85f1266 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -491,9 +491,20 @@ NOTE: Cobertura is licensed under GPL v2 with parts of it being under (such as a developer may use day to day) assuming no other resource hungry processes are running. -These assumptions are not always true (e.g. on CI systems running in a -virtual machine) so the performance tests may be deactivated by using the -following property: +Performance tests may be an absolute test (how long to complete a number +of iterations of an operation or set of operations) or may be a relative +test (how long two or more different approaches take to generate the same +result). The absolute tests may be destructive in that they run until the +system runs out of resources. + +Where there is no benefit in running an absolute performance test as part +of a standard test run, the test will be excluded by naming it +Tester*Performance.java. + +The relative tests are included as part of a standard test run however, +where the assumptions made about host capabilities are not true (e.g. on +CI systems running in virtual machine) the tests may be deactivated by +using the following property: test.excludePerformance=true - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 08/08: Don't test lazy vs full as they can be quite close
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 02e01b80f31380671d390e3739068df39e63128d Author: Mark Thomas AuthorDate: Mon Jan 8 13:46:16 2024 + Don't test lazy vs full as they can be quite close --- test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index f17098488e..0a0646db39 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -37,7 +37,8 @@ public class TestCharsetCachePerformance { Assert.assertTrue("No cache was faster than full cache", timeFull < timeNone); Assert.assertTrue("No cache was faster than lazy cache", timeLazy < timeNone); -Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); +// On average full cache is faster than lazy cache but they are close enough the test will fail sometimes +//Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 05/08: Comment this absolute performance test with an upper limit
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 5d04b808995aa16539edf6f89c72b4ecef9b3f4d Author: Mark Thomas AuthorDate: Mon Jan 8 12:09:29 2024 + Comment this absolute performance test with an upper limit Since there is an upper limit this test can pass/fail so it is included in the standard test run. --- test/org/apache/catalina/mapper/TestMapperPerformance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/org/apache/catalina/mapper/TestMapperPerformance.java b/test/org/apache/catalina/mapper/TestMapperPerformance.java index 606794397f..4b4feb8f81 100644 --- a/test/org/apache/catalina/mapper/TestMapperPerformance.java +++ b/test/org/apache/catalina/mapper/TestMapperPerformance.java @@ -21,6 +21,9 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test with an upper limit. Therefore it is executed as part of a standard test run. + */ public class TestMapperPerformance extends TestMapper { @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 06/08: This test is very timing sensitive. Add some test specific margins.
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 08d7da2c3998f7b2ee6c2e804d26274c7a725aa3 Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:31 2024 + This test is very timing sensitive. Add some test specific margins. The current margins are based on local testing and reports on the dev list. They may need to be relaxed further or if the results are very inconsistent between systems it may need to be disabled by default. --- .../server/TestAsyncMessagesPerformance.java | 47 +- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index 40ace938ca..926073af0f 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -36,6 +36,11 @@ import org.apache.catalina.startup.TomcatBaseTest; import org.apache.tomcat.websocket.TesterAsyncTiming; import org.apache.tomcat.websocket.TesterMessageCountClient.TesterProgrammaticEndpoint; +/* + * This test is very timing sensitive. Any failures need to be checked to see if the thresholds just need adjusting to + * support a wider range of platforms and/or Java versions or if the failure is an indication of a performance drop in + * the WebSocket implementation. + */ public class TestAsyncMessagesPerformance extends TomcatBaseTest { @Test @@ -69,11 +74,20 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { private long lastMessage = 0; private int sequence = 0; private int count = 0; +private long seqZeroTimingFailureCount = 0; +private long seqOneTimingFailureCount = 0; +private long seqTwoTimingFailureCount = 0; + private CountDownLatch latch = new CountDownLatch(1); private volatile boolean fail = false; @Override public void onMessage(ByteBuffer message, boolean last) { +// Expected received data is: +// 1 * 16k message in 2 * 8k chunks +// 1 * 4k message in 1 * 4k chunk +// 50 ms pause +// loop if (lastMessage == 0) { // First message. Don't check sequence++; @@ -87,34 +101,36 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ0: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } if (diff < 4000) { -System.out.println("Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ0: Expected diff > 40ms but was [" + diff + "], count [" + count + "]"); +seqZeroTimingFailureCount++; } } else if (sequence == 1) { sequence++; if (message.capacity() != 8192) { System.out.println( -"Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ1: Expected size 8192 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 2* 8k chunks of 16k message expected to be less than 0.5ms if (diff > 50) { -System.out.println("Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); -fail = true; +System.out.println("SEQ1: Expected diff < 500,000 but was [" + diff + "], count [" + count + "]"); +seqOneTimingFailureCount++; } } else if (sequence == 2) { sequence = 0; if (message.capacity() != 4096) { System.out.println( -"Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); +"SEQ2: Expected size 4096 but was [" + message.capacity() + "], count [" + count + "]"); fail = true; } +// Gap between 16k message and 4k message expected to be less than 0.5ms
(tomcat) 02/08: Add additional comment to existing absolute performance tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 4627204ed27ba99e65bcab0c878d7dc940aea38c Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:53 2024 + Add additional comment to existing absolute performance tests --- test/javax/el/TesterImportHandlerPerformance.java | 4 test/javax/websocket/TesterContainerProviderPerformance.java| 4 .../authenticator/TesterDigestAuthenticatorPerformance.java | 4 test/org/apache/tomcat/unittest/TesterThreadedPerformance.java | 3 +++ test/org/apache/tomcat/util/bcel/TesterPerformance.java | 6 ++ test/org/apache/tomcat/util/http/TesterCookiesPerformance.java | 4 test/org/apache/tomcat/util/http/TesterParametersPerformance.java | 4 7 files changed, 29 insertions(+) diff --git a/test/javax/el/TesterImportHandlerPerformance.java b/test/javax/el/TesterImportHandlerPerformance.java index ce05d0b8d0..77df4f2bd8 100644 --- a/test/javax/el/TesterImportHandlerPerformance.java +++ b/test/javax/el/TesterImportHandlerPerformance.java @@ -18,6 +18,10 @@ package javax.el; import org.junit.Test; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterImportHandlerPerformance { /* diff --git a/test/javax/websocket/TesterContainerProviderPerformance.java b/test/javax/websocket/TesterContainerProviderPerformance.java index 92b617a0a8..4732a834f8 100644 --- a/test/javax/websocket/TesterContainerProviderPerformance.java +++ b/test/javax/websocket/TesterContainerProviderPerformance.java @@ -23,6 +23,10 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterThreadedPerformance; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterContainerProviderPerformance { @Test diff --git a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java index c5006b5317..b99b8b1f63 100644 --- a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java +++ b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java @@ -41,6 +41,10 @@ import org.apache.tomcat.util.buf.HexUtils; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.security.ConcurrentMessageDigest; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterDigestAuthenticatorPerformance { private static String USER = "user"; diff --git a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java index 2c3112ca69..9e0ea4c29e 100644 --- a/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java +++ b/test/org/apache/tomcat/unittest/TesterThreadedPerformance.java @@ -19,6 +19,9 @@ package org.apache.tomcat.unittest; import java.util.function.IntConsumer; import java.util.function.Supplier; +/* + * Support class for threaded performance tests. + */ public class TesterThreadedPerformance { private final int threadCount; diff --git a/test/org/apache/tomcat/util/bcel/TesterPerformance.java b/test/org/apache/tomcat/util/bcel/TesterPerformance.java index 9319c47e2e..de785576a5 100644 --- a/test/org/apache/tomcat/util/bcel/TesterPerformance.java +++ b/test/org/apache/tomcat/util/bcel/TesterPerformance.java @@ -31,6 +31,12 @@ import org.apache.tomcat.Jar; import org.apache.tomcat.util.bcel.classfile.ClassParser; import org.apache.tomcat.util.scan.JarFactory; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + * + * The test also requires that the Jira lib directory has been extracted from a Jira install and copied to /tmp. + */ public class TesterPerformance { private static final String JAR_LOCATION = "/tmp/jira-libs"; diff --git a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java index 4f186c705d..3e3f2fb569 100644 --- a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java @@ -21,6 +21,10 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting
(tomcat) 01/08: Refactor absolute performance tests so they do not run by default
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit dcad3922644dbb59cd30e0436ef9abbadb99bbf0 Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:19 2024 + Refactor absolute performance tests so they do not run by default Absolute performance tests report the time taken to complete a series of actions. They cannot fail therefore do not run them as part of a standard test run. These tests are excluded by naming them Tester... --- ...erformance.java => TesterCompositeELResolverPerformance.java} | 6 +- ...ance.java => TesterScopedAttributeELResolverPerformance.java} | 6 +- ...TestRequestPerformance.java => TesterRequestPerformance.java} | 6 +- ...ormance.java => TesterApplicationHttpRequestPerformance.java} | 6 +- ...ormance.java => TesterDefaultInstanceManagerPerformance.java} | 9 + ...rmance.java => TesterAbstractFileResourceSetPerformance.java} | 6 +- ...PoolPerformance.java => TesterTagHandlerPoolPerformance.java} | 7 +-- ...ormance.java => TesterOneLineFormatterMillisPerformance.java} | 6 +- ...Performance.java => TesterFastHttpDateFormatPerformance.java} | 6 +- ...mitPerformance.java => TesterConnectionLimitPerformance.java} | 6 +- 10 files changed, 50 insertions(+), 14 deletions(-) diff --git a/test/javax/el/TestCompositeELResolverPerformance.java b/test/javax/el/TesterCompositeELResolverPerformance.java similarity index 88% rename from test/javax/el/TestCompositeELResolverPerformance.java rename to test/javax/el/TesterCompositeELResolverPerformance.java index b31907cab5..cd913c1d20 100644 --- a/test/javax/el/TestCompositeELResolverPerformance.java +++ b/test/javax/el/TesterCompositeELResolverPerformance.java @@ -18,7 +18,11 @@ package javax.el; import org.junit.Test; -public class TestCompositeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterCompositeELResolverPerformance { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=68119 diff --git a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java similarity index 87% rename from test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java rename to test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java index 9295155bd4..adaeabd010 100644 --- a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java +++ b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java @@ -25,7 +25,11 @@ import javax.servlet.jsp.TesterPageContext; import org.junit.Test; -public class TestScopedAttributeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterScopedAttributeELResolverPerformance { /* * With the caching of NotFound responses this test takes ~20ms. Without the diff --git a/test/org/apache/catalina/connector/TestRequestPerformance.java b/test/org/apache/catalina/connector/TesterRequestPerformance.java similarity index 87% rename from test/org/apache/catalina/connector/TestRequestPerformance.java rename to test/org/apache/catalina/connector/TesterRequestPerformance.java index 81a00829ce..42ec455051 100644 --- a/test/org/apache/catalina/connector/TestRequestPerformance.java +++ b/test/org/apache/catalina/connector/TesterRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterRequest; -public class TestRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterRequestPerformance { @Test public void localeParsePerformance() throws Exception { diff --git a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java similarity index 88% rename from test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java rename to test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java index 1592ceba2f..03d5932eb3 100644 --- a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java +++ b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.catalina.connector.Request; -public class TestApplicationHttpRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a
(tomcat) 03/07: Refactor so these relative performance tests generate pass/fail results
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit e854ef7ac1fdb02a708a694dfdf8ca7dafc8744a Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:21 2024 + Refactor so these relative performance tests generate pass/fail results --- .../apache/el/parser/TestELParserPerformance.java | 10 .../util/buf/TestCharsetCachePerformance.java | 30 +++--- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/test/org/apache/el/parser/TestELParserPerformance.java b/test/org/apache/el/parser/TestELParserPerformance.java index f4d90e7f9e..6a282cded6 100644 --- a/test/org/apache/el/parser/TestELParserPerformance.java +++ b/test/org/apache/el/parser/TestELParserPerformance.java @@ -18,10 +18,14 @@ package org.apache.el.parser; import java.io.StringReader; +import org.junit.Assert; import org.junit.Test; import org.apache.tomcat.util.collections.SynchronizedStack; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestELParserPerformance { /* @@ -46,6 +50,8 @@ public class TestELParserPerformance { final int runs = 20; final int parseIterations = 1; +long reinitTotalTime = 0; +long newTotalTime = 0; for (int j = 0; j < runs; j ++) { long start = System.nanoTime(); @@ -62,6 +68,7 @@ public class TestELParserPerformance { stack.push(parser); } long end = System.nanoTime(); +reinitTotalTime += (end - start); System.out.println(parseIterations + " iterations using ELParser.ReInit(...) took " + (end - start) + "ns"); @@ -74,9 +81,12 @@ public class TestELParserPerformance { parser.CompositeExpression(); } long end = System.nanoTime(); +newTotalTime += (end - start); System.out.println(parseIterations + " iterations usingnew ELParser(...) took " + (end - start) + "ns"); } + +Assert.assertTrue("Using new ElParser() was faster then using ELParser.ReInit", reinitTotalTime < newTotalTime); } } diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index 2ad8f7f142..f17098488e 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -21,29 +21,27 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; +import org.junit.Assert; import org.junit.Test; +/* + * This is a relative performance test so it remains part of the standard test run. + */ public class TestCharsetCachePerformance { @Test -public void testNoCsCache() throws Exception { -doTest(new NoCsCache()); -} - - -@Test -public void testFullCsCache() throws Exception { -doTest(new FullCsCache()); +public void testCache() throws Exception { +long timeNone = doTest(new NoCsCache()); +long timeFull = doTest(new FullCsCache()); +long timeLazy = doTest(new LazyCsCache()); + +Assert.assertTrue("No cache was faster than full cache", timeFull < timeNone); +Assert.assertTrue("No cache was faster than lazy cache", timeLazy < timeNone); +Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); } -@Test -public void testLazyCsCache() throws Exception { -doTest(new LazyCsCache()); -} - - -private void doTest(CsCache cache) throws Exception { +private long doTest(CsCache cache) throws Exception { int threadCount = 10; int iterations = 1000; String[] lookupNames = new String[] { @@ -68,6 +66,8 @@ public class TestCharsetCachePerformance { long endTime = System.nanoTime(); System.out.println(cache.getClass().getName() + ": " + (endTime - startTime) + "ns"); + +return endTime - startTime; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 06/07: Update the docs for running the tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit a9f29955f29af9c62d4a3659a5f2399baa934206 Author: Mark Thomas AuthorDate: Mon Jan 8 12:11:41 2024 + Update the docs for running the tests --- BUILDING.txt | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/BUILDING.txt b/BUILDING.txt index 5e16755e96..4fd85f1266 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -491,9 +491,20 @@ NOTE: Cobertura is licensed under GPL v2 with parts of it being under (such as a developer may use day to day) assuming no other resource hungry processes are running. -These assumptions are not always true (e.g. on CI systems running in a -virtual machine) so the performance tests may be deactivated by using the -following property: +Performance tests may be an absolute test (how long to complete a number +of iterations of an operation or set of operations) or may be a relative +test (how long two or more different approaches take to generate the same +result). The absolute tests may be destructive in that they run until the +system runs out of resources. + +Where there is no benefit in running an absolute performance test as part +of a standard test run, the test will be excluded by naming it +Tester*Performance.java. + +The relative tests are included as part of a standard test run however, +where the assumptions made about host capabilities are not true (e.g. on +CI systems running in virtual machine) the tests may be deactivated by +using the following property: test.excludePerformance=true - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/07: Add additional comment to existing absolute performance tests
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 19dd4d244f1310bbbc399839ea524bc2f4717ab2 Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:53 2024 + Add additional comment to existing absolute performance tests --- test/javax/el/TesterImportHandlerPerformance.java | 4 .../authenticator/TesterDigestAuthenticatorPerformance.java | 4 test/org/apache/tomcat/util/bcel/TesterPerformance.java | 6 ++ test/org/apache/tomcat/util/http/TesterCookiesPerformance.java | 4 test/org/apache/tomcat/util/http/TesterParametersPerformance.java | 4 5 files changed, 22 insertions(+) diff --git a/test/javax/el/TesterImportHandlerPerformance.java b/test/javax/el/TesterImportHandlerPerformance.java index ce05d0b8d0..77df4f2bd8 100644 --- a/test/javax/el/TesterImportHandlerPerformance.java +++ b/test/javax/el/TesterImportHandlerPerformance.java @@ -18,6 +18,10 @@ package javax.el; import org.junit.Test; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterImportHandlerPerformance { /* diff --git a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java index dd672ed6ac..0e542f3ac2 100644 --- a/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java +++ b/test/org/apache/catalina/authenticator/TesterDigestAuthenticatorPerformance.java @@ -34,6 +34,10 @@ import org.apache.tomcat.util.buf.HexUtils; import org.apache.tomcat.util.descriptor.web.LoginConfig; import org.apache.tomcat.util.security.ConcurrentMessageDigest; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterDigestAuthenticatorPerformance { private static String USER = "user"; diff --git a/test/org/apache/tomcat/util/bcel/TesterPerformance.java b/test/org/apache/tomcat/util/bcel/TesterPerformance.java index 9319c47e2e..de785576a5 100644 --- a/test/org/apache/tomcat/util/bcel/TesterPerformance.java +++ b/test/org/apache/tomcat/util/bcel/TesterPerformance.java @@ -31,6 +31,12 @@ import org.apache.tomcat.Jar; import org.apache.tomcat.util.bcel.classfile.ClassParser; import org.apache.tomcat.util.scan.JarFactory; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + * + * The test also requires that the Jira lib directory has been extracted from a Jira install and copied to /tmp. + */ public class TesterPerformance { private static final String JAR_LOCATION = "/tmp/jira-libs"; diff --git a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java index 4f186c705d..3e3f2fb569 100644 --- a/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterCookiesPerformance.java @@ -21,6 +21,10 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterCookiesPerformance { @Test diff --git a/test/org/apache/tomcat/util/http/TesterParametersPerformance.java b/test/org/apache/tomcat/util/http/TesterParametersPerformance.java index 17a7d5f8ec..abcc47f9e9 100644 --- a/test/org/apache/tomcat/util/http/TesterParametersPerformance.java +++ b/test/org/apache/tomcat/util/http/TesterParametersPerformance.java @@ -27,6 +27,10 @@ import org.junit.Test; import org.apache.tomcat.util.buf.B2CConverter; +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ public class TesterParametersPerformance { @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 8.5.x updated (060d0f2494 -> b9cdbfc9d6)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from 060d0f2494 Cleanup connector names in json new b5d444fa3d Refactor absolute performance tests so they do not run by default new 19dd4d244f Add additional comment to existing absolute performance tests new e854ef7ac1 Refactor so these relative performance tests generate pass/fail results new ee06a8fc08 Add additional comment to this relative performance test new 16e00257c3 Comment this absolute performance test with an upper limit new a9f29955f2 Update the docs for running the tests new b9cdbfc9d6 Don't test lazy vs full as they can be quite close The 7 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: BUILDING.txt | 17 +--- ...a => TesterCompositeELResolverPerformance.java} | 6 - test/javax/el/TesterImportHandlerPerformance.java | 4 +++ ...esterScopedAttributeELResolverPerformance.java} | 6 - .../TesterDigestAuthenticatorPerformance.java | 4 +++ .../connector/TestResponsePerformance.java | 9 --- ...formance.java => TesterRequestPerformance.java} | 6 - ...> TesterApplicationHttpRequestPerformance.java} | 6 - ...> TesterDefaultInstanceManagerPerformance.java} | 9 --- .../catalina/mapper/TestMapperPerformance.java | 3 +++ ... TesterAbstractFileResourceSetPerformance.java} | 6 - .../apache/el/parser/TestELParserPerformance.java | 10 +++ ...> TesterOneLineFormatterMillisPerformance.java} | 6 - .../apache/tomcat/util/bcel/TesterPerformance.java | 6 + .../util/buf/TestCharsetCachePerformance.java | 31 +++--- .../tomcat/util/http/TesterCookiesPerformance.java | 4 +++ .../util/http/TesterParametersPerformance.java | 4 +++ java => TesterConnectionLimitPerformance.java} | 6 - 18 files changed, 111 insertions(+), 32 deletions(-) rename test/javax/el/{TestCompositeELResolverPerformance.java => TesterCompositeELResolverPerformance.java} (88%) rename test/javax/servlet/jsp/el/{TestScopedAttributeELResolverPerformance.java => TesterScopedAttributeELResolverPerformance.java} (87%) rename test/org/apache/catalina/connector/{TestRequestPerformance.java => TesterRequestPerformance.java} (87%) rename test/org/apache/catalina/core/{TestApplicationHttpRequestPerformance.java => TesterApplicationHttpRequestPerformance.java} (88%) rename test/org/apache/catalina/core/{TestDefaultInstanceManagerPerformance.java => TesterDefaultInstanceManagerPerformance.java} (92%) rename test/org/apache/catalina/webresources/{TestAbstractFileResourceSetPerformance.java => TesterAbstractFileResourceSetPerformance.java} (93%) rename test/org/apache/juli/{TestOneLineFormatterMillisPerformance.java => TesterOneLineFormatterMillisPerformance.java} (92%) rename test/org/apache/tomcat/websocket/{TestConnectionLimitPerformance.java => TesterConnectionLimitPerformance.java} (93%) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/07: Refactor absolute performance tests so they do not run by default
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit b5d444fa3dfaaf7f34d24cade384e996247105dc Author: Mark Thomas AuthorDate: Mon Jan 8 12:06:19 2024 + Refactor absolute performance tests so they do not run by default Absolute performance tests report the time taken to complete a series of actions. They cannot fail therefore do not run them as part of a standard test run. These tests are excluded by naming them Tester... --- ...erformance.java => TesterCompositeELResolverPerformance.java} | 6 +- ...ance.java => TesterScopedAttributeELResolverPerformance.java} | 6 +- ...TestRequestPerformance.java => TesterRequestPerformance.java} | 6 +- ...ormance.java => TesterApplicationHttpRequestPerformance.java} | 6 +- ...ormance.java => TesterDefaultInstanceManagerPerformance.java} | 9 + ...rmance.java => TesterAbstractFileResourceSetPerformance.java} | 6 +- ...ormance.java => TesterOneLineFormatterMillisPerformance.java} | 6 +- ...mitPerformance.java => TesterConnectionLimitPerformance.java} | 6 +- 8 files changed, 40 insertions(+), 11 deletions(-) diff --git a/test/javax/el/TestCompositeELResolverPerformance.java b/test/javax/el/TesterCompositeELResolverPerformance.java similarity index 88% rename from test/javax/el/TestCompositeELResolverPerformance.java rename to test/javax/el/TesterCompositeELResolverPerformance.java index b31907cab5..cd913c1d20 100644 --- a/test/javax/el/TestCompositeELResolverPerformance.java +++ b/test/javax/el/TesterCompositeELResolverPerformance.java @@ -18,7 +18,11 @@ package javax.el; import org.junit.Test; -public class TestCompositeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterCompositeELResolverPerformance { /* * https://bz.apache.org/bugzilla/show_bug.cgi?id=68119 diff --git a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java similarity index 87% rename from test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java rename to test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java index 9295155bd4..adaeabd010 100644 --- a/test/javax/servlet/jsp/el/TestScopedAttributeELResolverPerformance.java +++ b/test/javax/servlet/jsp/el/TesterScopedAttributeELResolverPerformance.java @@ -25,7 +25,11 @@ import javax.servlet.jsp.TesterPageContext; import org.junit.Test; -public class TestScopedAttributeELResolverPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterScopedAttributeELResolverPerformance { /* * With the caching of NotFound responses this test takes ~20ms. Without the diff --git a/test/org/apache/catalina/connector/TestRequestPerformance.java b/test/org/apache/catalina/connector/TesterRequestPerformance.java similarity index 87% rename from test/org/apache/catalina/connector/TestRequestPerformance.java rename to test/org/apache/catalina/connector/TesterRequestPerformance.java index 81a00829ce..42ec455051 100644 --- a/test/org/apache/catalina/connector/TestRequestPerformance.java +++ b/test/org/apache/catalina/connector/TesterRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.tomcat.unittest.TesterRequest; -public class TestRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterRequestPerformance { @Test public void localeParsePerformance() throws Exception { diff --git a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java similarity index 88% rename from test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java rename to test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java index 8187bd2e7f..3d65fdc3b3 100644 --- a/test/org/apache/catalina/core/TestApplicationHttpRequestPerformance.java +++ b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java @@ -20,7 +20,11 @@ import org.junit.Test; import org.apache.catalina.connector.Request; -public class TestApplicationHttpRequestPerformance { +/* + * This is an absolute performance test. There is no benefit it running it as part of a standard test run so it is + * excluded due to the name starting Tester... + */ +public class TesterApplicationHttpRequestPerformance { @Test pu
(tomcat) 05/07: Comment this absolute performance test with an upper limit
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 16e00257c3274f53981df541b365b40655c9dfc5 Author: Mark Thomas AuthorDate: Mon Jan 8 12:09:29 2024 + Comment this absolute performance test with an upper limit Since there is an upper limit this test can pass/fail so it is included in the standard test run. --- test/org/apache/catalina/mapper/TestMapperPerformance.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/org/apache/catalina/mapper/TestMapperPerformance.java b/test/org/apache/catalina/mapper/TestMapperPerformance.java index 606794397f..4b4feb8f81 100644 --- a/test/org/apache/catalina/mapper/TestMapperPerformance.java +++ b/test/org/apache/catalina/mapper/TestMapperPerformance.java @@ -21,6 +21,9 @@ import org.junit.Test; import org.apache.tomcat.util.buf.MessageBytes; +/* + * This is an absolute performance test with an upper limit. Therefore it is executed as part of a standard test run. + */ public class TestMapperPerformance extends TestMapper { @Test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 07/07: Don't test lazy vs full as they can be quite close
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit b9cdbfc9d65a5d8d5f77f06b80c60a56faaec2a7 Author: Mark Thomas AuthorDate: Mon Jan 8 13:46:16 2024 + Don't test lazy vs full as they can be quite close --- test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java index f17098488e..0a0646db39 100644 --- a/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java +++ b/test/org/apache/tomcat/util/buf/TestCharsetCachePerformance.java @@ -37,7 +37,8 @@ public class TestCharsetCachePerformance { Assert.assertTrue("No cache was faster than full cache", timeFull < timeNone); Assert.assertTrue("No cache was faster than lazy cache", timeLazy < timeNone); -Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); +// On average full cache is faster than lazy cache but they are close enough the test will fail sometimes +//Assert.assertTrue("Lazy cache was faster than full cache ", timeFull < timeLazy); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 04/07: Add additional comment to this relative performance test
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit ee06a8fc085f484257078b9ab2a47d6e22f3837d Author: Mark Thomas AuthorDate: Mon Jan 8 12:08:41 2024 + Add additional comment to this relative performance test --- test/org/apache/catalina/connector/TestResponsePerformance.java | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/org/apache/catalina/connector/TestResponsePerformance.java b/test/org/apache/catalina/connector/TestResponsePerformance.java index 131d3aae08..986c49a0db 100644 --- a/test/org/apache/catalina/connector/TestResponsePerformance.java +++ b/test/org/apache/catalina/connector/TestResponsePerformance.java @@ -24,6 +24,10 @@ import org.junit.Test; import org.apache.catalina.startup.LoggingBaseTest; import org.apache.tomcat.unittest.TesterRequest; +/* + * This is a relative performance test so it remains part of the standard test run. If the test fails then we need to + * looking at why and possibly disable/remove the homebrew approach for some OS/Java combinations. + */ public class TestResponsePerformance extends LoggingBaseTest { private final int ITERATIONS = 10; @@ -38,9 +42,8 @@ public class TestResponsePerformance extends LoggingBaseTest { doHomebrew(resp); doUri(); -// Note: Java 9 on my OSX laptop consistently shows doUri() is faster -// than doHomebrew(). Worth a closer look for Tomcat 10 on the -// assumption it will require java 9 +// Note: With Java 11 the 'homebrew' approach is consistently 3-4 times faster on both MacOS (Intel) and Linux +// With Java 22 EA the 'homebrew' approach is consistently a little over 2x faster on MacOS (M1) // To allow for timing differences between runs, a "best of n" approach // is taken for this test - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch main updated (d24302cb12 -> a851f66e18)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git from d24302cb12 Don't test lazy vs full as they can be quite close new 9fd4c840f8 A null value should remove the attribute new a851f66e18 Running tests locally found threshold needed to be increased The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/jakarta/servlet/http/Cookie.java | 6 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java| 8 .../tomcat/websocket/server/TestAsyncMessagesPerformance.java | 2 +- webapps/docs/changelog.xml| 8 4 files changed, 22 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/02: A null value should remove the attribute
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit 9fd4c840f8726551915b93080ed5dcf926eb5a1c Author: Mark Thomas AuthorDate: Mon Jan 8 19:29:49 2024 + A null value should remove the attribute --- java/jakarta/servlet/http/Cookie.java | 6 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java| 8 webapps/docs/changelog.xml| 8 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/java/jakarta/servlet/http/Cookie.java b/java/jakarta/servlet/http/Cookie.java index 4fc87e5516..22ddc5d3ff 100644 --- a/java/jakarta/servlet/http/Cookie.java +++ b/java/jakarta/servlet/http/Cookie.java @@ -409,7 +409,11 @@ public class Cookie implements Cloneable, Serializable { } } -attributes.put(name, value); +if (value == null) { +attributes.remove(name); +} else { +attributes.put(name, value); +} } diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index 43ac4d0ffd..3079f423f8 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -95,6 +95,14 @@ public class TestCookieProcessorGeneration { doTest(cookie, "foo=" + value); } +@Test +public void valueNull() { +Cookie cookie = new Cookie("foo", "bar"); +cookie.setAttribute("other", "anything"); +cookie.setAttribute("other", null); +doTest(cookie, "foo=bar"); +} + @Test public void testMaxAgePositive() { doTestMaxAge(100, "foo=bar; Max-Age=100"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 7d752ad772..da9d7b705d 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,14 @@ issues do not "pop up" wrt. others). --> + + + +Setting a null value for a cookie attribute should remove +the attribute. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/02: Running tests locally found threshold needed to be increased
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git commit a851f66e18ed6bbb3a28a8974aed626bb77f5ee9 Author: Mark Thomas AuthorDate: Mon Jan 8 20:13:13 2024 + Running tests locally found threshold needed to be increased --- .../apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index 5304bee2ca..d4c7d3cb64 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -151,7 +151,7 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { if (seqZeroTimingFailureCount > 1) { // The 50ms pause after the short message may very rarely appear to be less than 40ms fail = true; -} else if (seqOneTimingFailureCount > 5) { +} else if (seqOneTimingFailureCount > 10) { // The two chunks of the 16k message may rarely be more than 0.5ms apart fail = true; } else if (seqTwoTimingFailureCount > 100) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Increment version for next development cycle
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 a833255f21 Increment version for next development cycle a833255f21 is described below commit a833255f21bc0dbdfc260907d7a99ebd5ad81e31 Author: Mark Thomas AuthorDate: Mon Jan 8 20:15:41 2024 + Increment version for next development cycle --- build.properties.default | 2 +- res/maven/mvn.properties.default | 2 +- webapps/docs/changelog.xml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.properties.default b/build.properties.default index 2b50948527..d3df06b9c7 100644 --- a/build.properties.default +++ b/build.properties.default @@ -31,7 +31,7 @@ # - Version Control Flags - version.major=10 version.minor=1 -version.build=18 +version.build=19 version.patch=0 version.suffix= version.dev=-dev diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default index 8f16ddb07a..ca154ebbcc 100644 --- a/res/maven/mvn.properties.default +++ b/res/maven/mvn.properties.default @@ -39,7 +39,7 @@ maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d maven.asf.release.repo.repositoryId=apache.releases.https # Release version info -maven.asf.release.deploy.version=10.1.18 +maven.asf.release.deploy.version=10.1.19 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 5af7effcc9..6713f2dd93 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,6 +104,8 @@ They eventually become mixed with the numbered issues (i.e., numbered issues do not "pop up" wrt. others). --> + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 8.5.x updated: Increment version for next development cycle
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new 327c998647 Increment version for next development cycle 327c998647 is described below commit 327c9986473182062e9a7f9f552d73b989be0dd2 Author: Mark Thomas AuthorDate: Mon Jan 8 20:17:44 2024 + Increment version for next development cycle --- build.properties.default | 2 +- res/maven/mvn.properties.default | 2 +- webapps/docs/changelog.xml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.properties.default b/build.properties.default index 82f93a94d7..ec7021c685 100644 --- a/build.properties.default +++ b/build.properties.default @@ -31,7 +31,7 @@ # - Version Control Flags - version.major=8 version.minor=5 -version.build=98 +version.build=99 version.patch=0 version.suffix= version.dev=-dev diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default index 7e7737801a..e771545a06 100644 --- a/res/maven/mvn.properties.default +++ b/res/maven/mvn.properties.default @@ -39,7 +39,7 @@ maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d maven.asf.release.repo.repositoryId=apache.releases.https # Release version info -maven.asf.release.deploy.version=8.5.98 +maven.asf.release.deploy.version=8.5.99 #Where do we load the libraries from tomcat.lib.path=../../output/build/lib diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 5d7b44b3f4..dcb891bd34 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -104,7 +104,9 @@ They eventually become mixed with the numbered issues (i.e., numbered issues do not "pop up" wrt. others). --> - + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 02/02: Running tests locally found threshold needed to be increased
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 commit c3c82556336215158c6f4aa9dc0b81b4ad60a6aa Author: Mark Thomas AuthorDate: Mon Jan 8 20:13:13 2024 + Running tests locally found threshold needed to be increased --- .../apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index 5304bee2ca..d4c7d3cb64 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -151,7 +151,7 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { if (seqZeroTimingFailureCount > 1) { // The 50ms pause after the short message may very rarely appear to be less than 40ms fail = true; -} else if (seqOneTimingFailureCount > 5) { +} else if (seqOneTimingFailureCount > 10) { // The two chunks of the 16k message may rarely be more than 0.5ms apart fail = true; } else if (seqTwoTimingFailureCount > 100) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated (a833255f21 -> c3c8255633)
This is an automated email from the ASF dual-hosted git repository. markt pushed a change to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git from a833255f21 Increment version for next development cycle new 8c5f93c282 A null value should remove the attribute new c3c8255633 Running tests locally found threshold needed to be increased The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/jakarta/servlet/http/Cookie.java | 6 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java| 8 .../tomcat/websocket/server/TestAsyncMessagesPerformance.java | 2 +- webapps/docs/changelog.xml| 8 4 files changed, 22 insertions(+), 2 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) 01/02: A null value should remove the attribute
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 commit 8c5f93c2823b4f3e52f54afa6dde32eb414e43a4 Author: Mark Thomas AuthorDate: Mon Jan 8 19:29:49 2024 + A null value should remove the attribute --- java/jakarta/servlet/http/Cookie.java | 6 +- .../apache/tomcat/util/http/TestCookieProcessorGeneration.java| 8 webapps/docs/changelog.xml| 8 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/java/jakarta/servlet/http/Cookie.java b/java/jakarta/servlet/http/Cookie.java index 4fc87e5516..22ddc5d3ff 100644 --- a/java/jakarta/servlet/http/Cookie.java +++ b/java/jakarta/servlet/http/Cookie.java @@ -409,7 +409,11 @@ public class Cookie implements Cloneable, Serializable { } } -attributes.put(name, value); +if (value == null) { +attributes.remove(name); +} else { +attributes.put(name, value); +} } diff --git a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java index 43ac4d0ffd..3079f423f8 100644 --- a/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java +++ b/test/org/apache/tomcat/util/http/TestCookieProcessorGeneration.java @@ -95,6 +95,14 @@ public class TestCookieProcessorGeneration { doTest(cookie, "foo=" + value); } +@Test +public void valueNull() { +Cookie cookie = new Cookie("foo", "bar"); +cookie.setAttribute("other", "anything"); +cookie.setAttribute("other", null); +doTest(cookie, "foo=bar"); +} + @Test public void testMaxAgePositive() { doTestMaxAge(100, "foo=bar; Max-Age=100"); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 6713f2dd93..8df4b785b5 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -105,6 +105,14 @@ issues do not "pop up" wrt. others). --> + + + +Setting a null value for a cookie attribute should remove +the attribute. (markt) + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Running tests locally found threshold needed to be increased
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 433d19b3d5 Running tests locally found threshold needed to be increased 433d19b3d5 is described below commit 433d19b3d50985fedb2c060ee3cf9c82cf4cc468 Author: Mark Thomas AuthorDate: Mon Jan 8 20:13:13 2024 + Running tests locally found threshold needed to be increased --- .../apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java index 926073af0f..764c1e4e9a 100644 --- a/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java +++ b/test/org/apache/tomcat/websocket/server/TestAsyncMessagesPerformance.java @@ -151,7 +151,7 @@ public class TestAsyncMessagesPerformance extends TomcatBaseTest { if (seqZeroTimingFailureCount > 1) { // The 50ms pause after the short message may very rarely appear to be less than 40ms fail = true; -} else if (seqOneTimingFailureCount > 5) { +} else if (seqOneTimingFailureCount > 10) { // The two chunks of the 16k message may rarely be more than 0.5ms apart fail = true; } else if (seqTwoTimingFailureCount > 100) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 10.1.18
On 05/01/2024 15:25, Christopher Schultz wrote: The proposed 10.1.18 release is: [ ] Broken - do not release [X] Stable - go ahead and release as 10.1.18 Tests pass on Linux for NIO and NIO2 with Tomcat Native 2.0.6 and OpenSSL 3.0.2 (locally built Tomcat Native with Ubuntu provided OpenSSL). FFM tests were included. Tests pass on Windows for NIO and NIO2 with Tomcat Native 2.0.6 and OpenSSL 3.0.11 (standard Tomcat Native binaries for Windows) apart from TestAsyncMessagesPerformance where failures are expected. FFM tests were excluded. Tests pass on MacOS (x64) for NIO and NIO2 with Tomcat Native 2.0.6 and OpenSSL 3.2.0 (locally built Tomcat Native and HomeBrew provided OpenSSL). FFM tests were included. Tests pass on MacOS (arch64) for NIO and NIO2 with Tomcat Native 2.0.6 and OpenSSL 3.2.0 (locally built Tomcat Native and HomeBrew provided OpenSSL). FFM tests were included. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.98
On 05/01/2024 16:53, Christopher Schultz wrote: The proposed 8.5.98 release is: [ ] Broken - do not release [X] Stable - go ahead and release as 8.5.98 (stable) The build is cross-platform repeatable apart from the fulldocs package which is due to a known Javadoc bug. Tests pass on Linux for NIO, NIO2 and APR with Tomcat Native 1.2.39 and OpenSSL 3.0.2 (locally built Tomcat Native with Ubuntu provided OpenSSL). Tests pass on Windows for NIO, NIO2 and APR with Tomcat Native 1.2.39 and OpenSSL 3.0.11 (standard Tomcat Native binaries for Windows). Tests pass on MacOS (x64) for NIO, NIO2 and APR with Tomcat Native 1.2.39 and OpenSSL 3.2.0 (locally built Tomcat Native and HomeBrew provided OpenSSL). Tests pass on MacOS (arch64) for NIO, NIO2 and APR with Tomcat Native 1.2.39 and OpenSSL 3.2.0 (locally built Tomcat Native and HomeBrew provided OpenSSL). Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.98
On Fri, Jan 5, 2024 at 8:20 AM Christopher Schultz < ch...@christopherschultz.net> wrote: > The proposed Apache Tomcat 8.5.98 release is now available for voting. > > The notable changes compared to 8.5.97 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file >parsing for PKCS#8 format keys that do not specify an explicit >pseudo-random function and rely on the default. This typically affects >keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, >fixing a regression caused by the introduction of a second >addSslHostConfig() method. > > Along with lots of other bug fixes and improvements. > > For full details, see the changelog: > https://nightlies.apache.org/tomcat/tomcat-8.5.x/docs/changelog.html > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.98/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1477 > > The tag is: > https://github.com/apache/tomcat/tree/8.5.98/ > 8653b0fc34bdb2a673ec5c306b1a95a7d466eaf4 > > The proposed 8.5.98 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 8.5.98 (stable) > +1 Igal > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
Re: [VOTE] Release Apache Tomcat 10.1.18
> On Jan 5, 2024, at 23:25, Christopher Schultz > wrote: > > The proposed Apache Tomcat 10.1.18 release is now available for > voting. > > The notable changes compared to 10.1.17 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file > parsing for PKCS#8 format keys that do not specify an explicit > pseudo-random function and rely on the default. This typically affects > keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, > fixing a regression caused by the introduction of a second > addSslHostConfig() method. > > For full details, see the change log: > https://nightlies.apache.org/tomcat/tomcat-10.1.x/docs/changelog.html > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 > without changes. Java EE applications designed for Tomcat 9 and earlier may > be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will > automatically convert them to Jakarta EE and copy them to the webapps > directory. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-10/v10.1.18/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1476 > > The tag is: > https://github.com/apache/tomcat/tree/10.1.18 > dd75fed1ae949455531e6a1aae55fb6ea7615786 > > The proposed 10.1.18 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 10.1.18 Han > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 8.5.98
> On Jan 6, 2024, at 00:53, Christopher Schultz > wrote: > > The proposed Apache Tomcat 8.5.98 release is now available for voting. > > The notable changes compared to 8.5.97 are: > > - Fix virtual thread support for the NIO2 connector. > > - Correct a regression in the fix for 67675 that broke TLS key file > parsing for PKCS#8 format keys that do not specify an explicit > pseudo-random function and rely on the default. This typically affects > keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, > fixing a regression caused by the introduction of a second > addSslHostConfig() method. > > Along with lots of other bug fixes and improvements. > > For full details, see the changelog: > https://nightlies.apache.org/tomcat/tomcat-8.5.x/docs/changelog.html > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-8/v8.5.98/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1478 > > The tag is: > https://github.com/apache/tomcat/tree/8.5.98/ > 8653b0fc34bdb2a673ec5c306b1a95a7d466eaf4 > > The proposed 8.5.98 release is: > [ ] Broken - do not release > [X] Stable - go ahead and release as 8.5.98 (stable) Han > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 11.0.0-M16
> On Jan 5, 2024, at 05:08, Mark Thomas wrote: > > The proposed Apache Tomcat 11.0.0-M16 release is now available for > voting. > > Apache Tomcat 11.0.0-M16 is a milestone release of the 11.0.x branch and has > been made to provide users with early access to the new features in Apache > Tomcat 11.0.x so that they may provide feedback. The notable changes compared > to the previous milestone include: > > - Fix virtual thread support for the NIO2 connector > > - Correct a regression in the fix for 67675 that broke TLS key file > parsing for PKCS#8 format keys that do not specify an explicit > pseudo-random function and rely on the default. This typically affects > keys generated by OpenSSL 1.0.2. > > - Allow multiple operations with the same name on introspected mbeans, > fixing a regression caused by the introduction of a second > addSslHostConfig() method. > > For full details, see the change log: > https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html > > Applications that run on Tomcat 9 and earlier will not run on Tomcat 11 > without changes. Java EE applications designed for Tomcat 9 and earlier may > be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will > automatically convert them to Jakarta EE and copy them to the webapps > directory. Applications using deprecated APIs may require further changes. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M16/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1474 > > The tag is: > https://github.com/apache/tomcat/tree/11.0.0-M16 > ca6ea22e9b6c47df1db85e9af80f80431c3ea19e > > > The proposed 11.0.0-M16 release is: > [ ] -1 Broken - do not release > [X] +1 Alpha - go ahead and release as 11.0.0-M16 Han > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 10.1.x updated: Add Run Configuration for IntelliJ IDEA
This is an automated email from the ASF dual-hosted git repository. isapir 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 a9b8314f51 Add Run Configuration for IntelliJ IDEA a9b8314f51 is described below commit a9b8314f51675dd1cf78bf51df0627dc0d176014 Author: Igal Sapir AuthorDate: Mon Jan 8 19:43:35 2024 -0800 Add Run Configuration for IntelliJ IDEA --- build.xml | 9 +++-- res/ide-support/idea/compiler.xml | 14 ++ res/ide-support/idea/tomcat.iml| 10 ++ res/ide-support/idea/workspace.xml | 18 ++ 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 7401a8d87b..f694eb022d 100644 --- a/build.xml +++ b/build.xml @@ -268,6 +268,7 @@ + @@ -3891,7 +3892,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho @@ -3900,7 +3901,11 @@ Read the Building page on the Apache Tomcat documentation site for details on ho -IntelliJ IDEA project directory created. + + +IntelliJ IDEA project directory created. +The SDK was set to "${build.java.version}" so make sure that your IDE has an SDK with that name, +or update the Project Settings accordingly. diff --git a/res/ide-support/idea/compiler.xml b/res/ide-support/idea/compiler.xml new file mode 100644 index 00..dc73b5a101 --- /dev/null +++ b/res/ide-support/idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml index 13e7a12569..48543ccdfe 100644 --- a/res/ide-support/idea/tomcat.iml +++ b/res/ide-support/idea/tomcat.iml @@ -138,5 +138,15 @@ + + + + + + + + + + diff --git a/res/ide-support/idea/workspace.xml b/res/ide-support/idea/workspace.xml new file mode 100644 index 00..761caf13ad --- /dev/null +++ b/res/ide-support/idea/workspace.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Add Run Configuration for IntelliJ IDEA
This is an automated email from the ASF dual-hosted git repository. isapir pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new a3cf9c5f8a Add Run Configuration for IntelliJ IDEA a3cf9c5f8a is described below commit a3cf9c5f8a05048b1e846a7a486bd2f9dca78d90 Author: Igal Sapir AuthorDate: Mon Jan 8 19:45:49 2024 -0800 Add Run Configuration for IntelliJ IDEA --- build.xml | 9 +++-- res/ide-support/idea/compiler.xml | 14 ++ res/ide-support/idea/tomcat.iml| 10 ++ res/ide-support/idea/workspace.xml | 18 ++ 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index ca7ecb66fd..2dc1d67144 100644 --- a/build.xml +++ b/build.xml @@ -265,6 +265,7 @@ + @@ -3830,7 +3831,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho @@ -3839,7 +3840,11 @@ Read the Building page on the Apache Tomcat documentation site for details on ho -IntelliJ IDEA project directory created. + + +IntelliJ IDEA project directory created. +The SDK was set to "${build.java.version}" so make sure that your IDE has an SDK with that name, +or update the Project Settings accordingly. diff --git a/res/ide-support/idea/compiler.xml b/res/ide-support/idea/compiler.xml new file mode 100644 index 00..dc73b5a101 --- /dev/null +++ b/res/ide-support/idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml index 13e7a12569..48543ccdfe 100644 --- a/res/ide-support/idea/tomcat.iml +++ b/res/ide-support/idea/tomcat.iml @@ -138,5 +138,15 @@ + + + + + + + + + + diff --git a/res/ide-support/idea/workspace.xml b/res/ide-support/idea/workspace.xml new file mode 100644 index 00..761caf13ad --- /dev/null +++ b/res/ide-support/idea/workspace.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 8.5.x updated: Add Run Configuration for IntelliJ IDEA
This is an automated email from the ASF dual-hosted git repository. isapir pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new ee09a48078 Add Run Configuration for IntelliJ IDEA ee09a48078 is described below commit ee09a48078699fe045d3d20c1dd8174d9ebf5d95 Author: Igal Sapir AuthorDate: Mon Jan 8 19:56:25 2024 -0800 Add Run Configuration for IntelliJ IDEA --- build.xml | 9 +++-- res/ide-support/idea/compiler.xml | 14 ++ res/ide-support/idea/tomcat.iml| 10 ++ res/ide-support/idea/workspace.xml | 18 ++ 4 files changed, 49 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index f743e84102..370591a1a6 100644 --- a/build.xml +++ b/build.xml @@ -275,6 +275,7 @@ + @@ -3474,7 +3475,7 @@ Read the Building page on the Apache Tomcat documentation site for details on ho @@ -3483,7 +3484,11 @@ Read the Building page on the Apache Tomcat documentation site for details on ho -IntelliJ IDEA project directory created. + + +IntelliJ IDEA project directory created. +The SDK was set to "${build.java.version}" so make sure that your IDE has an SDK with that name, +or update the Project Settings accordingly. diff --git a/res/ide-support/idea/compiler.xml b/res/ide-support/idea/compiler.xml new file mode 100644 index 00..dc73b5a101 --- /dev/null +++ b/res/ide-support/idea/compiler.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/res/ide-support/idea/tomcat.iml b/res/ide-support/idea/tomcat.iml index 904c85171c..c6112c6e86 100644 --- a/res/ide-support/idea/tomcat.iml +++ b/res/ide-support/idea/tomcat.iml @@ -120,5 +120,15 @@ + + + + + + + + + + diff --git a/res/ide-support/idea/workspace.xml b/res/ide-support/idea/workspace.xml new file mode 100644 index 00..761caf13ad --- /dev/null +++ b/res/ide-support/idea/workspace.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 10.1.18
On 1/5/24 16:25, Christopher Schultz wrote: [X] Stable - go ahead and release as 10.1.18 A part the: +++ [concat] TEST-org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO.txt [concat] TEST-org.apache.tomcat.websocket.server.TestAsyncMessagesPerformance.NIO2.txt +++ "messages" All tests are passing on fedora39 with tomcat-native-2.0.6 The release is reproducible. -- Cheers Jean-Frederic - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org