sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-tooling-jenkins] 13/27: SLING-3294 - Simplify Performance Test Creation
Date Tue, 07 Nov 2017 10:26:53 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.performance.base-0.0.2
in repository https://gitbox.apache.org/repos/asf/sling-tooling-jenkins.git

commit a3c136f53d9a933da411f038c36eb9694afd2725
Author: Antonio Sanso <asanso@apache.org>
AuthorDate: Wed Dec 18 10:04:45 2013 +0000

    SLING-3294 - Simplify Performance Test Creation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/performance/base@1551896 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/performance/AbstractRepositoryTest.java    | 13 ++++++++++++-
 .../sling/performance/FrameworkPerformanceMethod.java       |  2 +-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java b/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
index ff542c5..4854bca 100644
--- a/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
+++ b/src/main/java/org/apache/sling/performance/AbstractRepositoryTest.java
@@ -27,7 +27,14 @@ import org.apache.sling.jcr.api.SlingRepository;
 
   
 public abstract class AbstractRepositoryTest {
-	
+
+    protected String testInstanceName;
+
+    public AbstractRepositoryTest(String testInstanceName) {
+        super();
+        this.testInstanceName = testInstanceName;
+    }
+
 	private static class ShutdownThread extends Thread {
         @Override
         public void run() {
@@ -80,5 +87,9 @@ public abstract class AbstractRepositoryTest {
         }
         return testRoot;
     }
+    
+    public String toString(){
+    	return testInstanceName;
+    }
 
 }
diff --git a/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java b/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
index 36a0271..be28c78 100644
--- a/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
+++ b/src/main/java/org/apache/sling/performance/FrameworkPerformanceMethod.java
@@ -177,7 +177,7 @@ class FrameworkPerformanceMethod extends FrameworkMethod {
 		}
 
 		if (statistics.getN() > 0) {
-            ReportLogger.writeReport(this.performanceSuiteState.testSuiteName, testCaseName,
this.target.getClass().getName(),
+		    ReportLogger.writeReport(this.performanceSuiteState.testSuiteName, testCaseName, ((String
)this.target.getClass().getMethod("toString", null).invoke(this.target, null)),
                     getMethod().getName(), statistics, ReportLogger.ReportType.TXT, reportLevel);
 		}
 

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message