You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2010/10/11 10:45:38 UTC
svn commit: r1021283 - in /jackrabbit/trunk/test/performance: README.txt
base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
parent/pom.xml
Author: jukka
Date: Mon Oct 11 08:45:38 2010
New Revision: 1021283
URL: http://svn.apache.org/viewvc?rev=1021283&view=rev
Log:
JCR-2695: Jackrabbit performance test suite
Disable assertions during performance tests to better simulate a production environment.
Split the -Donly option to separate -Donly and -Drepo settings, and set the default to only test against release versions.
Modified:
jackrabbit/trunk/test/performance/README.txt
jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
jackrabbit/trunk/test/performance/parent/pom.xml
Modified: jackrabbit/trunk/test/performance/README.txt
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/README.txt?rev=1021283&r1=1021282&r2=1021283&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/README.txt (original)
+++ jackrabbit/trunk/test/performance/README.txt Mon Oct 11 08:45:38 2010
@@ -12,12 +12,16 @@ Note that the test suite will take more
avoid distorting the results you should avoid putting any extra load on
the computer while the test suite is running.
-The results are stored as jackrabbit*/target/*.txt report files.
+The results are stored as jackrabbit*/target/*.txt report files and can
+be combined into an HTML report by running the following command on a
+(Unix) system where gnuplot is installed.
+
+ sh plot.sh
Selecting which tests to run
----------------------------
-The -Donly= command line parameter allows you to specify a regexp for
+The -Donly command line parameter allows you to specify a regexp for
selecting which performance test cases to run. To run a single test
case, use a command like this:
@@ -27,6 +31,20 @@ To run all concurrency tests, use:
mvn clean install -Donly=Concurrent.*Test
+Selecting which repository versions/configurations to test
+----------------------------------------------------------
+
+The -Drepo command line parameter allows you to specify a regexp for
+selecting the repository versions and configurations against which the
+performance tests are run. The default setting selects only the official
+release versions:
+
+ mvn clean install -Drepo=\d\.\d
+
+To run the tests against all included configurations, use:
+
+ mvn clean install -Drepo=.*
+
Using a profiler
----------------
Modified: jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java?rev=1021283&r1=1021282&r2=1021283&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java (original)
+++ jackrabbit/trunk/test/performance/base/src/main/java/org/apache/jackrabbit/performance/AbstractPerformanceTest.java Mon Oct 11 08:45:38 2010
@@ -47,21 +47,15 @@ public abstract class AbstractPerformanc
private final Credentials credentials =
new SimpleCredentials("admin", "admin".toCharArray());
+ private Pattern repoPattern;
private Pattern testPattern;
protected void testPerformance(String name) throws Exception {
- String only = System.getProperty("only", ".*:.*");
- int colon = only.indexOf(':');
- if (colon == -1) {
- colon = only.length();
- only = only + ":-1";
- }
-
- testPattern = Pattern.compile(only.substring(0, colon));
- Pattern namePattern = Pattern.compile(only.substring(colon + 1));
+ repoPattern = Pattern.compile(System.getProperty("repo", "\\d\\.\\d"));
+ testPattern = Pattern.compile(System.getProperty("only", ".*"));
// Create a repository using the Jackrabbit default configuration
- if (namePattern.matcher(name).matches()) {
+ if (repoPattern.matcher(name).matches()) {
testPerformance(name, getDefaultConfig());
}
@@ -75,7 +69,7 @@ public abstract class AbstractPerformanc
if (file.isFile() && xml.endsWith(".xml")) {
String repositoryName =
name + "-" + xml.substring(0, xml.length() - 4);
- if (namePattern.matcher(repositoryName).matches()) {
+ if (repoPattern.matcher(repositoryName).matches()) {
testPerformance(
repositoryName,
FileUtils.openInputStream(file));
Modified: jackrabbit/trunk/test/performance/parent/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/test/performance/parent/pom.xml?rev=1021283&r1=1021282&r2=1021283&view=diff
==============================================================================
--- jackrabbit/trunk/test/performance/parent/pom.xml (original)
+++ jackrabbit/trunk/test/performance/parent/pom.xml Mon Oct 11 08:45:38 2010
@@ -40,7 +40,8 @@
<packaging>pom</packaging>
<properties>
- <only>.*:.*</only>
+ <repo>\d\.\d</repo>
+ <only>.*</only>
<scale>0</scale>
</properties>
@@ -57,12 +58,17 @@
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <enableAssertions>false</enableAssertions>
<systemProperties>
<property>
<name>derby.stream.error.file</name>
<value>target/derby.log</value>
</property>
<property>
+ <name>repo</name>
+ <value>${repo}</value>
+ </property>
+ <property>
<name>only</name>
<value>${only}</value>
</property>