jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r981943 - in /jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark: PerformanceTestSuite.java TestInputStream.java
Date Tue, 03 Aug 2010 15:52:18 GMT
Author: jukka
Date: Tue Aug  3 15:52:18 2010
New Revision: 981943

URL: http://svn.apache.org/viewvc?rev=981943&view=rev
Log:
JCR-2695: Jackrabbit performance test suite

Make the PerformanceTestSuite class easier to reuse.
Make the TestInputStream class deterministic.

Modified:
    jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/PerformanceTestSuite.java
    jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/TestInputStream.java

Modified: jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/PerformanceTestSuite.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/PerformanceTestSuite.java?rev=981943&r1=981942&r2=981943&view=diff
==============================================================================
--- jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/PerformanceTestSuite.java
(original)
+++ jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/PerformanceTestSuite.java
Tue Aug  3 15:52:18 2010
@@ -43,7 +43,7 @@ public class PerformanceTestSuite {
         this.credentials = credentials;
     }
 
-    public void runTest(PerformanceTest test) throws Exception {
+    public SummaryStatistics runTest(PerformanceTest test) throws Exception {
         SummaryStatistics statistics = new SummaryStatistics();
 
         test.setRepository(repository);
@@ -71,6 +71,11 @@ public class PerformanceTestSuite {
 
         test.afterSuite();
 
+        return statistics;
+    }
+
+    public void run(PerformanceTest test) throws Exception {
+        SummaryStatistics statistics = runTest(test);
         System.out.format(
                 "%-36.36s  %6.0f  %6.0f  %6.0f  %6.0f  %6d%n",
                 test,

Modified: jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/TestInputStream.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/TestInputStream.java?rev=981943&r1=981942&r2=981943&view=diff
==============================================================================
--- jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/TestInputStream.java
(original)
+++ jackrabbit/commons/jcr-benchmark/trunk/src/main/java/org/apache/jackrabbit/benchmark/TestInputStream.java
Tue Aug  3 15:52:18 2010
@@ -20,7 +20,7 @@ class TestInputStream extends InputStrea
         n = length;
         i = 0;
 
-        new Random().nextBytes(data);
+        new Random(1234567890).nextBytes(data);
     }
 
     @Override



Mime
View raw message