incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1391855 - in /sling/trunk/performance: base/src/main/java/org/apache/sling/performance/ base/src/main/java/org/apache/sling/performance/annotation/ jcr-resource-2.0.10/ jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/ jcr-re...
Date Sat, 29 Sep 2012 18:22:44 GMT
Author: asanso
Date: Sat Sep 29 18:22:43 2012
New Revision: 1391855

URL: http://svn.apache.org/viewvc?rev=1391855&view=rev
Log:
SLING-2593 - Improvement for the Sling performance tools. Adding patch provided from Christian Vazzolla. Thanks Christian! 

Added:
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ParameterizedTestList.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceRunner.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceSuiteState.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ReportLogger.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterMethodInvocation.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSpecificTest.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSuite.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeMethodInvocation.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSpecificTest.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSuite.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTest.java
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTestSuite.java
Modified:
    sling/trunk/performance/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
    sling/trunk/performance/jcr-resource-2.0.10/pom.xml
    sling/trunk/performance/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java
    sling/trunk/performance/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
    sling/trunk/performance/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java
    sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java

Modified: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java (original)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java Sat Sep 29 18:22:43 2012
@@ -26,7 +26,7 @@ import org.apache.sling.jcr.api.SlingRep
 
 
   
-public abstract class AbstractRepositoryTest extends AbstractTest {
+public abstract class AbstractRepositoryTest {
 	
 	private static class ShutdownThread extends Thread {
         @Override
@@ -34,7 +34,7 @@ public abstract class AbstractRepository
             try {
                 RepositoryUtil.stopRepository();
             } catch(Exception e) {
-                System.out.println("Exception in ShutdownThread:" + e);
+                //ignore for now
             }
         }
         
@@ -81,10 +81,4 @@ public abstract class AbstractRepository
         return testRoot;
     }
 
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        if(session != null) {
-            session.logout();
-        }
-    }}
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,282 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import javax.naming.directory.InvalidAttributesException;
+
+import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
+import org.apache.sling.performance.annotation.AfterMethodInvocation;
+import org.apache.sling.performance.annotation.BeforeMethodInvocation;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runners.model.FrameworkMethod;
+
+class FrameworkPerformanceMethod extends FrameworkMethod {
+        
+		private Object target;
+        private PerformanceSuiteState performanceSuiteState; 
+        
+        public FrameworkPerformanceMethod(Method method, Object target, PerformanceSuiteState performanceSuiteState) {
+        		super(method);
+                this.target = target;
+                this.performanceSuiteState = performanceSuiteState;
+                
+        }
+
+        @Override
+        public Object invokeExplosively(Object target, Object... params) throws Throwable {
+        	// Executes the test method on the supplied target
+        	
+        	// Check if this is the first test running from this specific PerformanceSuite
+        	// and run the BeforeSuite methods
+        	if ((performanceSuiteState != null) && (performanceSuiteState.getBeforeSuiteMethod() != null)
+        			&& (performanceSuiteState.getTargetObjectSuite() != null)
+        			&& (performanceSuiteState.getNumberOfExecutedMethods() == 0)
+        			&& !performanceSuiteState.testSuiteName.equals(ParameterizedTestList.TEST_CASE_ONLY)){
+        		performanceSuiteState.getBeforeSuiteMethod().invoke(performanceSuiteState.getTargetObjectSuite());
+        	}
+        	
+        	// In case of a PerformanceSuite we need to run the methods annotated with Before and After
+        	// ourselves as JUnit can't find them (JUnit is looking for them in the test  suite class);
+        	// in case we don't have to deal with a PerformanceSuite just skip this as JUnit will run the methods itself
+        	if ((performanceSuiteState != null) && !performanceSuiteState.testSuiteName.equals(ParameterizedTestList.TEST_CASE_ONLY)){
+        		
+        		recursiveCallSpecificMethod(this.target.getClass(), this.target, Before.class);
+        	}
+        	
+        	// Need to count the number of tests run from the PerformanceSuite
+        	// so that we can call the AfterSuite method after the last test from the suite 
+        	// has run and the AfterSuite needs to run
+        	performanceSuiteState.incrementNumberOfExecutedTestMethods();
+        	
+        	Object response = null;
+        	
+ 	    	Method testMethodToInvoke = this.getMethod();
+ 	    	
+ 	    	PerformanceTest performanceAnnotation = testMethodToInvoke.getAnnotation(PerformanceTest.class);
+ 	    	
+ 	    	// retrieve the test configuration options
+ 	    	int warmuptime = performanceAnnotation.warmuptime();
+ 	    	int runtime = performanceAnnotation.runtime();
+ 	    	int warmupinvocations = performanceAnnotation.warmupinvocations();
+ 	    	int runinvocations = performanceAnnotation.runinvocations();
+ 	    	
+     		DescriptiveStatistics statistics = new DescriptiveStatistics();
+ 	         	
+     		//System.out.println("Warmup started - test :" + testMethodToInvoke.getName());
+     		
+ 	            if (warmupinvocations != 0){
+ 	            	// Run the number of invocation specified in the annotation
+ 	            	// for warming up the system
+ 	            	for (int invocationIndex = 0; invocationIndex < warmupinvocations; invocationIndex++){
+ 	            		
+ 	            		recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeMethodInvocation.class);
+ 	            		
+ 	            		//TODO: implement the method to run a before a specific test method
+ 	            		//recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeSpecificTest.class);
+ 	            		
+ 	            		response = super.invokeExplosively(this.target, params);
+ 	            		
+ 	            		//TODO: implement the method to run a after a specific test method
+ 	            		//recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterSpecificTest.class);
+ 	            		
+ 	            		recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterMethodInvocation.class);
+ 	            	}
+ 	            }
+ 	            else{
+ 		        	// Run a few iterations to warm up the system
+ 		            long warmupEnd = System.currentTimeMillis() + warmuptime * 1000;
+ 		            while (System.currentTimeMillis() < warmupEnd) {
+ 		            	recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeMethodInvocation.class);
+ 		            	
+ 		            	//TODO: implement the method to run a before a specific test method
+ 		            	//recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeSpecificTest.class);
+ 	            		
+ 	            		response = super.invokeExplosively(this.target, params);
+ 	            		
+ 	            		//recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterSpecificTest.class);
+ 	            		//TODO: implement the method to run a after a specific test method
+ 	            		
+ 	            		recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterMethodInvocation.class);
+ 		            }
+ 	            }
+ 	
+ 	            //System.out.println("Warmup ended - test :" + testMethodToInvoke.getName());
+ 	            if (runinvocations != 0){
+ 	            	// Run the specified number of iterations and capture the execution times
+ 	            	for (int invocationIndex = 0; invocationIndex < runinvocations; invocationIndex++){
+ 	            		
+ 	            		response = this.invokeTimedTestMethod(testMethodToInvoke, statistics, params);
+	            	}
+ 	            }
+ 	            else{
+ 		            // Run test iterations and capture the execution times
+ 		            long runtimeEnd = System.currentTimeMillis() + runtime * 1000;
+            		
+ 		            while (System.currentTimeMillis() < runtimeEnd) {
+ 		            	
+ 		            	response = this.invokeTimedTestMethod(testMethodToInvoke, statistics, params);
+ 		            	
+ 		            }
+ 		        }
+  	            
+ 	        if (statistics.getN() > 0) {
+ 	            ReportLogger.writeReport(this.target.getClass().getName(), this.performanceSuiteState.testSuiteName, 
+ 	            		getMethod().getName() , statistics, ReportLogger.ReportType.TXT);
+ 	        }
+  	        
+ 	        // In case of a PerformanceSuite we need to run the methods annotated with Before and After
+        	// ourselves as JUnit can't find them; in case we don't have to deal with a PerformanceSuite
+        	// just skip this as JUnit will run the methods itself
+ 	        if ((performanceSuiteState != null) 
+ 	        		&& !performanceSuiteState.testSuiteName.equals(ParameterizedTestList.TEST_CASE_ONLY)){
+	        	
+	        	recursiveCallSpecificMethod(this.target.getClass(), this.target, After.class);
+	        }
+ 	        
+ 	        
+ 	        // Check if this is the last test running from a PerformanceSuite
+        	// and run the AfterSuite method
+ 	        if ((performanceSuiteState != null) && (performanceSuiteState.getAfterSuiteMethod() != null)
+ 	        		&& (performanceSuiteState.getTargetObjectSuite() != null)
+ 	        		&& (performanceSuiteState.getNumberOfExecutedMethods() == performanceSuiteState.getNumberOfMethodsInSuite())
+ 	        		&& !performanceSuiteState.testSuiteName.equals(ParameterizedTestList.TEST_CASE_ONLY)){
+ 	    	    performanceSuiteState.getAfterSuiteMethod().invoke(performanceSuiteState.getTargetObjectSuite());
+ 	    	   
+ 	        }
+ 	         	        
+            return response;
+        }
+        
+        /**
+         * Method that runs 1 invocation of the timed test method
+         * @param testMethodToInvoke the test method to invoke
+         * @param statistics the statistics object that collects the results
+         * @param params the parameters for the invocation of the test method
+         * @return the response from the method invocation
+         * @throws Throwable
+         */
+        private Object invokeTimedTestMethod(Method testMethodToInvoke, DescriptiveStatistics statistics, Object... params) 
+        		throws Throwable{
+        	
+        	Object response = null;
+        	
+        	recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeMethodInvocation.class);
+	            
+	        //TODO: implement the method to run a before a specific test method
+	        //recursiveCallSpecificMethod(this.target.getClass(), this.target, BeforeSpecificTest.class); 
+         	
+     		// timing the test method execution
+         	//System.out.println("Start test: " + testMethodToInvoke.getName());
+         	long start = System.nanoTime();
+         	response = super.invokeExplosively(this.target, params);
+         	long timeMilliseconds =TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS); 
+         	statistics.addValue(timeMilliseconds);
+         	
+            //System.out.println("End test: " + testMethodToInvoke.getName());
+              
+            //System.out.println("Test execution time (ms): " + timeMilliseconds);
+             
+            //TODO: implement the method to run a after a specific test method
+	        //recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterSpecificTest.class);
+	            
+	        recursiveCallSpecificMethod(this.target.getClass(), this.target, AfterMethodInvocation.class);
+	        
+	        return response;
+        }
+        
+        /**
+         * Recursively call a specific method annotated with a custom annotation 
+         * @param test the test class that contains the method
+         * @param instance the instance on which will run the method
+         * @param methodAnnotation the method annotation to look for
+         * @throws InvocationTargetException
+         * @throws InvalidAttributesException
+         * @throws IllegalAccessException
+         * @throws InstantiationException
+         */
+        @SuppressWarnings({"rawtypes"})
+        private void recursiveCallSpecificMethod(Class test, Object instance, Class<? extends Annotation> methodAnnotation) throws InvocationTargetException, InvalidAttributesException, IllegalAccessException, InstantiationException{
+     	   if (test.getSuperclass() != null){
+     		  recursiveCallSpecificMethod(test.getSuperclass(), instance, methodAnnotation);
+     	   }
+     	   
+     	   Method testMethod = getSpecificTestMethod(test, methodAnnotation);
+     		if (testMethod != null){
+     			if (!testMethod.isAccessible()){
+     				testMethod.setAccessible(true);
+      			}
+     			testMethod.invoke(instance);
+     		}
+     	}
+        
+        /**
+         * Get the method annotated with the custom annotation
+         * @param testClass the test class on which to look for the method
+         * @param methodAnnotation the method annotation to look for
+         * @return
+         * @throws InvalidAttributesException
+         * @throws IllegalAccessException
+         * @throws InstantiationException
+         */
+        @SuppressWarnings({"rawtypes"})
+        private Method getSpecificTestMethod(Class testClass, Class<? extends Annotation> methodAnnotation) throws InvalidAttributesException, IllegalAccessException, InstantiationException{
+        	
+        	Method[] methodsToReturn =  getSpecificMethods(testClass,methodAnnotation);
+        	Method methodToReturn = null;
+        	if (methodsToReturn.length == 1){
+        		methodToReturn = methodsToReturn[0];
+        	}
+        	else if (methodsToReturn.length > 1){
+        		throw new InvalidAttributesException("Only 1 non parameterized before method accepted");
+        	}
+        	
+        	return methodToReturn;
+        }
+        
+       
+         /**
+          * Retrieve all the specific methods from test class
+          * @param testClass the test class that we need to search in
+          * @param annotation the annotation that we should look for
+          * @return the list with the methods that have the specified annotation
+          */
+         @SuppressWarnings({"rawtypes"})
+         private Method[] getSpecificMethods(Class testClass, Class<? extends Annotation> annotation){
+         	Method[] allMethods = testClass.getDeclaredMethods(); 
+             
+             List<Method> methodListResult = new ArrayList<Method>();
+             
+             for(Method testMethod : allMethods){
+             	if (testMethod.isAnnotationPresent(annotation)){
+             		methodListResult.add(testMethod);
+             	}
+             }
+             return methodListResult.toArray(new Method[]{});
+         }
+ 
+}
+
+

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ParameterizedTestList.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ParameterizedTestList.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ParameterizedTestList.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ParameterizedTestList.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents the object that will be returned by the method 
+ * in which a new PerformanceTestSuite is created
+ *
+ */
+public class ParameterizedTestList {
+
+	public static final String TEST_CASE_ONLY = "TESTCASEONLY";
+	
+	private List<Object> testObjectList = new ArrayList<Object>();
+	private String testSuiteTitle = TEST_CASE_ONLY;
+	private Map<String, String> parameters = new LinkedHashMap<String, String>();
+	private Map<String, Object> parametersObjects = new LinkedHashMap<String, Object>();
+	
+	public Map<String, Object> getParametersObjects() {
+		return parametersObjects;
+	}
+
+	public void addParameterObject(String key, Object parameterObject) {
+		this.parametersObjects.put(key, parameterObject);
+	}
+	
+	public Map<String, String> getParameters() {
+		return parameters;
+	}
+	
+	public void addParameter(String key, String value) {
+		parameters.put(key, value);
+	}
+	
+	public List<Object> getTestObjectList() {
+		return testObjectList;
+	}
+	
+	public void addTestObject(Object testObject) {
+		testObjectList.add(testObject);
+	}
+	
+	public String getTestSuiteName() {
+		return testSuiteTitle;
+	}
+
+	public void setTestSuiteTitle(String testSuiteTitle) {
+		this.testSuiteTitle = testSuiteTitle;
+	}
+	
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceRunner.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceRunner.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceRunner.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceRunner.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,209 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.sling.performance.annotation.AfterSuite;
+import org.apache.sling.performance.annotation.BeforeSuite;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.apache.sling.performance.annotation.PerformanceTestSuite;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+
+
+/**
+ * The custom JUnit runner that collects the performance tests
+ *
+ */
+public class PerformanceRunner extends BlockJUnit4ClassRunner {
+        protected LinkedList<FrameworkMethod> tests = new LinkedList<FrameworkMethod>();
+        private List<PerformanceSuiteState> suitesState = new ArrayList<PerformanceSuiteState>();
+        
+        
+        public PerformanceRunner(Class<?> clazz) throws InitializationError {
+        	super(clazz);
+        	try {
+        		computeTests();
+        		}
+        	catch (Exception e) {
+        		throw new InitializationError(e);
+        	}
+        }
+
+        /**
+         * Compute the tests that will be run
+         * @throws Exception
+         */
+        protected void computeTests() throws Exception {
+                tests.addAll(super.computeTestMethods());
+                
+                // count the performance tests
+                tests.addAll(computePerformanceTests());
+                
+                // This is called here to ensure the test class constructor is called at least
+                // once during testing.  
+                createTest();
+        }
+        
+        /**
+         * Compute performance tests
+         * @return the list containing the performance test methods
+         * @throws Exception
+         */
+        protected Collection<? extends FrameworkMethod> computePerformanceTests() throws Exception {
+                List<FrameworkPerformanceMethod> tests = new LinkedList<FrameworkPerformanceMethod>();
+
+                List<Object> testObjects = new ArrayList<Object>();
+                ParameterizedTestList testCenter = new ParameterizedTestList();
+                
+                // Retrieve the test objects included in the Performance test suite
+                for (FrameworkMethod method: getTestClass().getAnnotatedMethods(PerformanceTestSuite.class)) {
+                	Object targetObject = getTestClass().getJavaClass().newInstance();
+                	if (method.getMethod().getReturnType().equals(ParameterizedTestList.class)){
+                		testCenter = (ParameterizedTestList) method.getMethod().invoke(targetObject);
+                		testObjects = testCenter.getTestObjectList();
+                	}
+                	else{
+                		throw new InitializationError("Wrong signature for the @PerformanceSuite method");
+                	}
+                }
+                
+                // Retrieve the methods before running the methods from the test suite
+                List<FrameworkMethod> beforeSuiteMethods = getTestClass().getAnnotatedMethods(BeforeSuite.class);
+                if (beforeSuiteMethods.size() > 1){
+                	throw new InitializationError("Only one @BeforeSuite method is allowed for a @PerformanceSuite");
+                }
+                
+                // Retrieve the methods before running the methods from the test suite
+                List<FrameworkMethod> afterSuiteMethods = getTestClass().getAnnotatedMethods(AfterSuite.class);
+                if (afterSuiteMethods.size() > 1){
+                	throw new InitializationError("Only one @AfterSuite method is allowed for a @PerformanceSuite");
+                }
+                
+                PerformanceSuiteState current = null;
+                boolean suiteAlreadyRegistered = false;
+                
+                for(PerformanceSuiteState suiteState : suitesState){
+                	if (suiteState.testSuiteName.equals(testCenter.getTestSuiteName())){
+                		suiteAlreadyRegistered = true;
+                		suiteState.incrementNumberOfTestMethodsInSuite();
+                		current = suiteState;
+                		break;
+                	}
+                }
+                
+                // Create a new PerformanceSuiteState object
+                PerformanceSuiteState newSuite = new PerformanceSuiteState(testCenter.getTestSuiteName());
+                
+                if (!suiteAlreadyRegistered){	
+                	if (beforeSuiteMethods.size() == 1){
+	        			newSuite.setBeforeSuiteMethod(beforeSuiteMethods.get(0).getMethod());
+	        		}
+	        		if (afterSuiteMethods.size() == 1){
+	        			newSuite.setAfterSuiteMethod(afterSuiteMethods.get(0).getMethod());
+	        		}
+	        		
+	        		current = newSuite;
+	        		newSuite.setTargetObjectSuite(getTestClass().getJavaClass().newInstance());
+	        		
+                }
+        		
+                
+                // In case there are any objects retrieved from the Performance Suite
+                // we should add them to the tests that will be run and increase the number of methods
+                // contained in the PerformaceSuite
+                if (!testObjects.isEmpty()){
+                	for (Object testObject : testObjects){
+                		// retrieve the test methods from the test classes 
+                		Method[] testMethods = getSpecificMethods(testObject.getClass(), PerformanceTest.class); 
+                		
+                		if (!suiteAlreadyRegistered){
+                			newSuite.incrementNumberOfTestMethodsInSuite();
+                		}
+                		
+                		for (Method method: testMethods){
+                			FrameworkPerformanceMethod performaceTestMethod = new FrameworkPerformanceMethod(method, testObject, current);
+                			tests.add(performaceTestMethod);
+                		}
+                	}
+                	
+                	// add the new suite to the list of suites 
+                	suitesState.add(newSuite);
+                }
+
+                // Retrieve the performance tests in the case we don't have a performance test suite
+                for (FrameworkMethod method: getTestClass().getAnnotatedMethods(PerformanceTest.class)) {
+                	Object targetObject = getTestClass().getJavaClass().newInstance();
+                	FrameworkPerformanceMethod performaceTestMethod = new FrameworkPerformanceMethod(method.getMethod(), targetObject, current);
+              	  	tests.add(performaceTestMethod);
+                }
+                
+                return tests;
+        }
+       
+        
+        /**
+         * Retrieve specific method from test class
+         * @param testClass the test class that we need to search in
+         * @param annotation the annotation that we should look for
+         * @return the list with the methods that have the specified annotation
+         */
+        @SuppressWarnings({"rawtypes"})
+        private Method[] getSpecificMethods(Class testClass, Class<? extends Annotation> annotation){
+        	Method[] allMethods = testClass.getDeclaredMethods(); 
+            
+            List<Method> methodListResult = new ArrayList<Method>();
+            
+            for(Method testMethod : allMethods){
+            	if (testMethod.isAnnotationPresent(annotation)){
+            		methodListResult.add(testMethod);
+            	}
+            }
+            return methodListResult.toArray(new Method[]{});
+        }
+        
+        /**
+         * {@inheritDoc}
+         * @see org.junit.runners.BlockJUnit4ClassRunner#computeTestMethods()
+         */
+        @Override
+        protected List<FrameworkMethod> computeTestMethods() {
+                return tests;
+        }
+
+        /**
+         * Need to override method otherwise the validation will fail because of some
+         * hardcoded conditions in JUnit
+         */
+        @Override
+        protected void validateInstanceMethods(List<Throwable> errors) {
+                validatePublicVoidNoArgMethods(After.class, false, errors);
+                validatePublicVoidNoArgMethods(Before.class, false, errors);
+                validateTestMethods(errors);
+        }
+        
+        
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceSuiteState.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceSuiteState.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceSuiteState.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/PerformanceSuiteState.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance;
+
+import java.lang.reflect.Method;
+
+public class PerformanceSuiteState {
+
+	public String testSuiteName = ParameterizedTestList.TEST_CASE_ONLY;
+	
+	private Method beforeSuiteMethod;
+	private Method afterSuiteMethod;
+	private int numberOfMethodsInSuite = 0;
+	private int numberOfExecutedMethods = 0;
+	private Object targetObjectSuite;
+	
+	public PerformanceSuiteState(String testSuiteName){
+		this.testSuiteName = testSuiteName;
+	}
+	
+	public void incrementNumberOfTestMethodsInSuite(){
+		numberOfMethodsInSuite++;
+	}
+	
+	public void incrementNumberOfExecutedTestMethods(){
+		numberOfExecutedMethods++;
+	}
+	
+	public String getTestSuiteName() {
+		return testSuiteName;
+	}
+
+	public void setTestSuiteName(String testSuiteName) {
+		this.testSuiteName = testSuiteName;
+	}
+
+	public Method getBeforeSuiteMethod() {
+		return beforeSuiteMethod;
+	}
+
+	public void setBeforeSuiteMethod(Method beforeSuiteMethod) {
+		this.beforeSuiteMethod = beforeSuiteMethod;
+	}
+
+	public Method getAfterSuiteMethod() {
+		return afterSuiteMethod;
+	}
+
+	public void setAfterSuiteMethod(Method afterSuiteMethod) {
+		this.afterSuiteMethod = afterSuiteMethod;
+	}
+
+	public int getNumberOfMethodsInSuite() {
+		return numberOfMethodsInSuite;
+	}
+
+	public void setNumberOfMethodsInSuite(int numberOfMethodsInSuite) {
+		this.numberOfMethodsInSuite = numberOfMethodsInSuite;
+	}
+
+	public int getNumberOfExecutedMethods() {
+		return numberOfExecutedMethods;
+	}
+
+	public void setNumberOfExecutedMethods(int numberOfExecutedMethods) {
+		this.numberOfExecutedMethods = numberOfExecutedMethods;
+	}
+
+	public Object getTargetObjectSuite() {
+		return targetObjectSuite;
+	}
+
+	public void setTargetObjectSuite(Object targetObjectSuite) {
+		this.targetObjectSuite = targetObjectSuite;
+	}
+	
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ReportLogger.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ReportLogger.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ReportLogger.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/ReportLogger.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,96 @@
+package org.apache.sling.performance;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.apache.commons.io.output.FileWriterWithEncoding;
+import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
+
+public class ReportLogger {
+
+	public enum ReportType{
+		TXT, XML
+	}
+	
+	
+	public static void writeReport(String test, String testSuiteName, String name, DescriptiveStatistics statistics, ReportType reportType) throws Exception{
+		switch(reportType){
+		case TXT:
+			writeReportTxt(test, testSuiteName, name, statistics);
+			break;
+		case XML:
+			throw new Exception("The XML reporting format is not yet supported");
+		default:
+			throw new Exception("The specified reporting format is not yet supported");
+		}
+	}
+	
+	/**
+     * Method the writes the performance report after a test is run
+     * @param test the test name
+     * @param name the name that will be listed in the report
+     * @param statistics the statistics data to be written
+     * @throws IOException
+     */
+    public static void writeReportTxt(String test, String testSuiteName, String name, DescriptiveStatistics statistics)
+   		    throws IOException {
+    	
+	        	String className=test;  
+	        	className=className.substring(className.lastIndexOf(".")+1);
+    	
+    			File reportDir = new File("target/performance-reports");
+    			if (!reportDir.exists()){
+   		        	boolean test1 = reportDir.mkdir();	 
+   		        }
+    			
+    			File report = new File("target/performance-reports", className + ".txt");
+   		           		        
+   		        // need this in the case a user wants to set the suite name from the command line
+   		        // useful if we run the test cases from the command line for example 
+   		        // by using maven
+   		        if (testSuiteName.equals(ParameterizedTestList.TEST_CASE_ONLY)){
+	   		        if (System.getenv("testsuitename") != null){
+	   		        	testSuiteName = System.getenv("testsuitename");
+	   		        }
+   		        }
+   		        
+   		        boolean needsPrefix = !report.exists();
+   		        PrintWriter writer = new PrintWriter(
+   		                new FileWriterWithEncoding(report, "UTF-8", true));   
+   		     try {
+   	            if (needsPrefix) {
+   	                writer.format(
+   	                        "# %-34.34s     min     10%%     50%%     90%%     max%n",
+   	                        className);
+   	            }
+
+   	            writer.format(
+   	                    "%-36.36s  %6.0f  %6.0f  %6.0f  %6.0f  %6.0f%n",
+   	                    testSuiteName,
+   	                    statistics.getMin(),
+   	                    statistics.getPercentile(10.0),
+   	                    statistics.getPercentile(50.0),
+   	                    statistics.getPercentile(90.0),
+   	                    statistics.getMax());
+   	        } finally {
+   	            writer.close();
+   	        }
+    }
+    
+  
+    /**
+     * Get the date that will be written into the result file
+     * @return
+     */
+    private static String getDate(){
+		DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+		Date date = new Date();
+
+		return dateFormat.format(date);
+	}
+	
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterMethodInvocation.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterMethodInvocation.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterMethodInvocation.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterMethodInvocation.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AfterMethodInvocation {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSpecificTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSpecificTest.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSpecificTest.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSpecificTest.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AfterSpecificTest {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSuite.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSuite.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSuite.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/AfterSuite.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AfterSuite {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeMethodInvocation.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeMethodInvocation.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeMethodInvocation.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeMethodInvocation.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BeforeMethodInvocation {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSpecificTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSpecificTest.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSpecificTest.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSpecificTest.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BeforeSpecificTest {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSuite.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSuite.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSuite.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/BeforeSuite.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface BeforeSuite {
+
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTest.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTest.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTest.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * Performance test annotation to use for the framework to be able to find
+ * all the tests in the test class 
+ *
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PerformanceTest {
+	
+	
+	// set the warmup time for the test
+	int warmuptime() default 1;
+	
+	// set the run time of the test
+	int runtime() default 5;
+	
+	// set the number of invocations to time 
+	// by default the run time is used instead
+	int runinvocations() default 0;
+	
+	// set the number of invocations to run
+	// in the warm up phase
+	int warmupinvocations() default 0;
+	
+	
+}

Added: sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTestSuite.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTestSuite.java?rev=1391855&view=auto
==============================================================================
--- sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTestSuite.java (added)
+++ sling/trunk/performance/base/src/main/java/org/apache/sling/performance/annotation/PerformanceTestSuite.java Sat Sep 29 18:22:43 2012
@@ -0,0 +1,10 @@
+package org.apache.sling.performance.annotation;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PerformanceTestSuite {
+
+}

Modified: sling/trunk/performance/jcr-resource-2.0.10/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/performance/jcr-resource-2.0.10/pom.xml?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/jcr-resource-2.0.10/pom.xml (original)
+++ sling/trunk/performance/jcr-resource-2.0.10/pom.xml Sat Sep 29 18:22:43 2012
@@ -48,7 +48,7 @@
             <version>2.0</version>
             <scope>compile</scope>
         </dependency>
-         <dependency>
+        <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.performance.tests</artifactId>
             <version>0.0.1-SNAPSHOT</version>

Modified: sling/trunk/performance/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java (original)
+++ sling/trunk/performance/jcr-resource-2.0.10/src/test/java/org/apache/sling/performance/PerformanceTest.java Sat Sep 29 18:22:43 2012
@@ -16,9 +16,6 @@
  */
 package org.apache.sling.performance;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Session;
 
@@ -31,14 +28,18 @@ import org.apache.sling.jcr.resource.Jcr
 import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
 import org.apache.sling.jcr.resource.internal.helper.MapEntries;
 import org.apache.sling.jcr.resource.internal.helper.Mapping;
+import org.apache.sling.performance.annotation.PerformanceTestSuite;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;
+import org.junit.runner.RunWith;
+
 
-public class PerformanceTest extends AbstractPerformanceTest {
+@RunWith(PerformanceRunner.class)
+public class PerformanceTest {
 
     private class Helper implements TestHelper {
 
@@ -85,18 +86,22 @@ public class PerformanceTest extends Abs
         }
     }
 
-    public void testPerformance() throws Exception {
+    @PerformanceTestSuite
+    public ParameterizedTestList testPerformance() throws Exception {
         Helper helper = new Helper();
         
-        List<AbstractTest> tests = new ArrayList<AbstractTest>();
-        tests.add(new ResolveNonExistingWith1000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith5000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith10000VanityPathTest(helper));
+        ParameterizedTestList testCenter = new ParameterizedTestList();
+        testCenter.setTestSuiteTitle("jcr.resource-2.0.10");
+        testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
         //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith1000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith5000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith10000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
         //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
-        testPerformance("jcr.resource-2.0.10", tests);
+        
+        return testCenter;
+        
     }
 }

Modified: sling/trunk/performance/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java (original)
+++ sling/trunk/performance/jcr-resource-2.1.0/src/test/java/org/apache/sling/performance/PerformanceTest.java Sat Sep 29 18:22:43 2012
@@ -17,15 +17,9 @@
 package org.apache.sling.performance;
 
 import static org.mockito.Mockito.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Session;
-
 import junitx.util.PrivateAccessor;
-
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.ResourceResolver;
 import org.apache.sling.jcr.api.SlingRepository;
@@ -33,18 +27,21 @@ import org.apache.sling.jcr.resource.Jcr
 import org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl;
 import org.apache.sling.jcr.resource.internal.helper.MapEntries;
 import org.apache.sling.jcr.resource.internal.helper.Mapping;
+import org.apache.sling.performance.annotation.PerformanceTestSuite;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith1000VanityPathTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith5000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith5000VanityPathTest;
+import org.junit.runner.RunWith;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.event.Event;
 import org.osgi.service.event.EventAdmin;
 import org.osgi.util.tracker.ServiceTracker;
 
-public class PerformanceTest extends AbstractPerformanceTest {
+@RunWith(PerformanceRunner.class)
+public class PerformanceTest {
 
     private class Helper implements TestHelper {
 
@@ -104,18 +101,21 @@ public class PerformanceTest extends Abs
         }
     }
     
-    public void testPerformance() throws Exception {
+    @PerformanceTestSuite
+    public ParameterizedTestList testPerformance() throws Exception {
         Helper helper = new Helper();
         
-        List<AbstractTest> tests = new ArrayList<AbstractTest>();
-        tests.add(new ResolveNonExistingWith1000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith5000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith10000VanityPathTest(helper));
+        ParameterizedTestList testCenter = new ParameterizedTestList();
+        testCenter.setTestSuiteTitle("jcr.resource-2.1.0");
+        testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
         //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith1000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith5000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith10000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
         //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
-        testPerformance("jcr.resource-2.1.0", tests);
+                
+        return testCenter;
     }
 }

Modified: sling/trunk/performance/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java (original)
+++ sling/trunk/performance/jcr-resource-2.2.0/src/test/java/org/apache/sling/performance/PerformanceTest.java Sat Sep 29 18:22:43 2012
@@ -17,18 +17,12 @@
 package org.apache.sling.performance;
 
 import static org.mockito.Mockito.mock;
-
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-
 import javax.jcr.NamespaceRegistry;
 import javax.jcr.Session;
-
 import junitx.util.PrivateAccessor;
-
 import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.QueriableResourceProvider;
 import org.apache.sling.api.resource.ResourceProvider;
@@ -37,6 +31,7 @@ import org.apache.sling.api.resource.Res
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.resource.JcrResourceConstants;
 import org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory;
+import org.apache.sling.performance.annotation.PerformanceTestSuite;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000AliasTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith10000VanityPathTest;
 import org.apache.sling.performance.tests.ResolveNonExistingWith1000AliasTest;
@@ -47,11 +42,13 @@ import org.apache.sling.resourceresolver
 import org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl;
 import org.apache.sling.resourceresolver.impl.mapping.MapEntries;
 import org.apache.sling.resourceresolver.impl.mapping.Mapping;
+import org.junit.runner.RunWith;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;
 import org.osgi.service.event.EventAdmin;
 
-public class PerformanceTest extends AbstractPerformanceTest {
+@RunWith(PerformanceRunner.class)
+public class PerformanceTest {
 
     private class Helper implements TestHelper {
 
@@ -112,18 +109,21 @@ public class PerformanceTest extends Abs
         }
     }
     
-    public void testPerformance() throws Exception {
+    @PerformanceTestSuite
+    public ParameterizedTestList testPerformance() throws Exception {
         Helper helper = new Helper();
         
-        List<AbstractTest> tests = new ArrayList<AbstractTest>();
-        tests.add(new ResolveNonExistingWith1000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith5000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith10000VanityPathTest(helper));
+        ParameterizedTestList testCenter = new ParameterizedTestList();
+        testCenter.setTestSuiteTitle("jcr.resource-2.2.0");
+        testCenter.addTestObject(new ResolveNonExistingWith1000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000VanityPathTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000VanityPathTest(helper));
         //tests.add(new ResolveNonExistingWith30000VanityPathTest(helper));
-        tests.add(new ResolveNonExistingWith1000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith5000AliasTest(helper));
-        tests.add(new ResolveNonExistingWith10000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith1000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith5000AliasTest(helper));
+        testCenter.addTestObject(new ResolveNonExistingWith10000AliasTest(helper));
         //tests.add(new ResolveNonExistingWith30000AliasTest(helper));
-        testPerformance("jcr.resource-2.2.0", tests);
+        
+        return testCenter;
     }
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000AliasTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,21 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith10000AliasTest extends ResolveNonExistingWithManyAliasTest {
     
     public ResolveNonExistingWith10000AliasTest(TestHelper helper) {
         super(helper, 10000);
     }
+    
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 
 }
\ No newline at end of file

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith10000VanityPathTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,21 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith10000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
 
     public ResolveNonExistingWith10000VanityPathTest(TestHelper helper) {
         super(helper, 100, 100);
     }
+    
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000AliasTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,20 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith1000AliasTest extends ResolveNonExistingWithManyAliasTest {
     
     public ResolveNonExistingWith1000AliasTest(TestHelper helper) {
         super(helper, 1000);
     }
 
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith1000VanityPathTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,20 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith1000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
 
     public ResolveNonExistingWith1000VanityPathTest(TestHelper helper) {
         super(helper, 100, 10);
     }
 
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000AliasTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,21 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith30000AliasTest extends ResolveNonExistingWithManyAliasTest {
     
     public ResolveNonExistingWith30000AliasTest(TestHelper helper) {
         super(helper, 30000);
     }
+    
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 
 }
\ No newline at end of file

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith30000VanityPathTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,20 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith30000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
 
     public ResolveNonExistingWith30000VanityPathTest(TestHelper helper) {
         super(helper, 300, 100);
     }
 
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000AliasTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,21 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith5000AliasTest extends ResolveNonExistingWithManyAliasTest {
     
     public ResolveNonExistingWith5000AliasTest(TestHelper helper) {
         super(helper, 5000);
     }
+    
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 
 }
\ No newline at end of file

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWith5000VanityPathTest.java Sat Sep 29 18:22:43 2012
@@ -16,12 +16,21 @@
  */
 package org.apache.sling.performance.tests;
 
+import org.apache.sling.performance.PerformanceRunner;
 import org.apache.sling.performance.TestHelper;
+import org.apache.sling.performance.annotation.PerformanceTest;
+import org.junit.runner.RunWith;
 
+@RunWith(PerformanceRunner.class)
 public class ResolveNonExistingWith5000VanityPathTest extends ResolveNonExistingWithManyVanityPathTest {
 
     public ResolveNonExistingWith5000VanityPathTest(TestHelper helper) {
         super(helper, 100, 50);
     }
+    
+    @PerformanceTest
+    public void resolveNonExistingWith10000AliasTest() throws Exception {
+        super.runTest();
+    }
 
 }

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyAliasTest.java Sat Sep 29 18:22:43 2012
@@ -30,6 +30,8 @@ import org.apache.sling.commons.testing.
 import org.apache.sling.performance.AbstractRepositoryTest;
 import org.apache.sling.performance.TestHelper;
 import org.apache.sling.performance.ResourceResolverTestRequest;
+import org.junit.After;
+import org.junit.Before;
 
 import static org.junit.Assert.assertNotNull;
 
@@ -54,7 +56,7 @@ class ResolveNonExistingWithManyAliasTes
         this.nodeCount = nodeCount;
     }
 
-    @Override
+    @After
     protected void afterSuite() throws Exception {
         if (helper != null) {
             helper.dispose();
@@ -69,7 +71,7 @@ class ResolveNonExistingWithManyAliasTes
         session.save();
     }
 
-    @Override
+    @Before
     protected void beforeSuite() throws Exception {
         RepositoryUtil.registerNodeType(getSession(),
                 this.getClass().getResourceAsStream("/SLING-INF/nodetypes/folder.cnd"));
@@ -113,7 +115,6 @@ class ResolveNonExistingWithManyAliasTes
 
     }
 
-    @Override
     protected void runTest() throws Exception {
         String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingAlias"
                 + ".print.html");

Modified: sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java?rev=1391855&r1=1391854&r2=1391855&view=diff
==============================================================================
--- sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java (original)
+++ sling/trunk/performance/tests/src/main/java/org/apache/sling/performance/tests/ResolveNonExistingWithManyVanityPathTest.java Sat Sep 29 18:22:43 2012
@@ -32,6 +32,8 @@ import org.apache.sling.commons.testing.
 import org.apache.sling.performance.AbstractRepositoryTest;
 import org.apache.sling.performance.TestHelper;
 import org.apache.sling.performance.ResourceResolverTestRequest;
+import org.junit.After;
+import org.junit.Before;
 
 class ResolveNonExistingWithManyVanityPathTest extends AbstractRepositoryTest {
     
@@ -59,7 +61,7 @@ class ResolveNonExistingWithManyVanityPa
         this.childNodeCount = childNodeCount;
     }
 
-    @Override
+    @After
     protected void afterSuite() throws Exception {
         if (helper != null) {
             helper.dispose();
@@ -74,7 +76,7 @@ class ResolveNonExistingWithManyVanityPa
         session.save();
     }
 
-    @Override
+    @Before
     protected void beforeSuite() throws Exception {
         RepositoryUtil.registerNodeType(getSession(),
                 this.getClass().getResourceAsStream("/SLING-INF/nodetypes/folder.cnd"));
@@ -124,7 +126,7 @@ class ResolveNonExistingWithManyVanityPa
 
     }
 
-    @Override
+
     protected void runTest() throws Exception {
         String path = ResourceUtil.normalize(ResourceUtil.getParent(rootPath) + "/" + "testNonExistingVanity"
                 + ".print.html");



Mime
View raw message