You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by mb...@apache.org on 2022/06/28 03:08:24 UTC
[netbeans] branch master updated: improve php test performance
This is an automated email from the ASF dual-hosted git repository.
mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 7cbddb3b7a improve php test performance
new 4f8fbb4bd1 Merge pull request #4284 from mbien/php-test-perf
7cbddb3b7a is described below
commit 7cbddb3b7a0def62a6f0b5f63e657efb90aee040
Author: Michael Bien <mb...@gmail.com>
AuthorDate: Sun Jun 26 03:29:20 2022 +0200
improve php test performance
- set event delay to 0
- tweak JVM settings a bit (little bit more heap, use throughput GC)
the event delay caused some tests to lose >1s per test method with CPU mostly
idling. Tests with a lot of cases were observed to complete 4-5x faster after
this tweak.
e.g: OccurrencesFinderImplTest: ~10 mins -> ~2 mins
---
.../test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java | 5 +++++
ide/ide.kit/nbproject/project.properties | 4 ++--
.../src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java | 4 +++-
java/java.hints/nbproject/project.properties | 4 ++--
nbbuild/templates/projectized.xml | 2 +-
5 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
index 2b4721ee61..c478f9fcd6 100644
--- a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
+++ b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java
@@ -189,6 +189,11 @@ import static org.openide.util.test.MockLookup.setLookup;
*/
public abstract class CslTestBase extends NbTestCase {
+ static {
+ // testing performance: set scanner update delay to 0
+ System.setProperty(PathRegistry.class.getName()+".FIRER_EVT_COLLAPSE_WINDOW", "0");
+ }
+
public CslTestBase(String testName) {
super(testName);
}
diff --git a/ide/ide.kit/nbproject/project.properties b/ide/ide.kit/nbproject/project.properties
index 3d351d1bfc..fab4dd4f63 100644
--- a/ide/ide.kit/nbproject/project.properties
+++ b/ide/ide.kit/nbproject/project.properties
@@ -42,7 +42,7 @@ test.config.versioning.includes=\
test.timeout=900000
requires.nb.javac=true
-test.run.args=-ea -Xmx700m -XX:+IgnoreUnrecognizedVMOptions \
+test.jms.flags=\
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing=ALL-UNNAMED \
@@ -50,4 +50,4 @@ test.run.args=-ea -Xmx700m -XX:+IgnoreUnrecognizedVMOptions \
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt=ALL-UNNAMED \
--add-modules=jdk.jdwp.agent,jdk.attach,jdk.jdi,jdk.jshell,java.compiler,jdk.compiler,jdk.management,jdk.unsupported,jdk.internal.le,jdk.internal.ed,jdk.internal.opt,jdk.internal.jvmstat \
- --add-exports=jdk.jdi/com.sun.jdi=ALL-UNNAMED \
+ --add-exports=jdk.jdi/com.sun.jdi=ALL-UNNAMED
diff --git a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java
index 28ebcb5b10..c978015dab 100644
--- a/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java
+++ b/ide/parsing.indexing/src/org/netbeans/modules/parsing/impl/indexing/PathRegistry.java
@@ -68,7 +68,9 @@ import org.openide.util.WeakListeners;
public final class PathRegistry implements Runnable {
private static final boolean FIRE_UNKNOWN_ALWAYS = false;
- /*test*/ static final int FIRER_EVT_COLLAPSE_WINDOW = 500;
+
+ // property set/field used in tests
+ static final int FIRER_EVT_COLLAPSE_WINDOW = Integer.getInteger(PathRegistry.class.getName()+".FIRER_EVT_COLLAPSE_WINDOW", 500);
private static PathRegistry instance;
private static final RequestProcessor firer = new RequestProcessor ("Path Registry Request Processor"); //NOI18N
diff --git a/java/java.hints/nbproject/project.properties b/java/java.hints/nbproject/project.properties
index e3a498a2b2..308b92b0b2 100644
--- a/java/java.hints/nbproject/project.properties
+++ b/java/java.hints/nbproject/project.properties
@@ -115,8 +115,8 @@ test.config.batch2-vanilla-javac.includes=\
test.config.batch2-vanilla-javac.excludes=\
${vanilla-javac.excludes}
-test.run.args=-ea -Xmx700m -XX:+IgnoreUnrecognizedVMOptions \
+test.jms.flags=\
--add-opens=java.base/java.net=ALL-UNNAMED \
--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED \
--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED \
- --add-opens=java.desktop/sun.awt=ALL-UNNAMED \
+ --add-opens=java.desktop/sun.awt=ALL-UNNAMED
diff --git a/nbbuild/templates/projectized.xml b/nbbuild/templates/projectized.xml
index 3e4bda6d56..287fe6b233 100644
--- a/nbbuild/templates/projectized.xml
+++ b/nbbuild/templates/projectized.xml
@@ -290,7 +290,7 @@
<target name="test-lib-init" depends="-init-bootclasspath-prepend,init,-build-libs.junit4">
<path id="test.unit.lib.cp"/>
<property name="test.jms.flags" value=""/>
- <property name="test.run.args" value="-ea -Xmx700m ${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
+ <property name="test.run.args" value="-ea -Xms1200m -Xmx1200m -XX:+UseParallelGC ${metabuild.jms-flags.jvm} ${test.jms.flags} -XX:+IgnoreUnrecognizedVMOptions"/>
<property name="extra.test.libs.dir" location="${test.dist.dir}/extralibs"/>
<macrodef name="test-init-nborg">
<attribute name="test.type"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists