You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@turbine.apache.org by gk...@apache.org on 2021/01/14 11:06:16 UTC

svn commit: r1885479 - in /turbine/core/branches/URLMapperService: conf/test/fulcrumComponentConfiguration.xml src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java

Author: gk
Date: Thu Jan 14 11:06:16 2021
New Revision: 1885479

URL: http://svn.apache.org/viewvc?rev=1885479&view=rev
Log:
- fix max-total for pool limit (is set to 1024 by default in fulcrum parser component for commons pool2) to allow performance test with values higher than that.

Modified:
    turbine/core/branches/URLMapperService/conf/test/fulcrumComponentConfiguration.xml
    turbine/core/branches/URLMapperService/src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java

Modified: turbine/core/branches/URLMapperService/conf/test/fulcrumComponentConfiguration.xml
URL: http://svn.apache.org/viewvc/turbine/core/branches/URLMapperService/conf/test/fulcrumComponentConfiguration.xml?rev=1885479&r1=1885478&r2=1885479&view=diff
==============================================================================
--- turbine/core/branches/URLMapperService/conf/test/fulcrumComponentConfiguration.xml (original)
+++ turbine/core/branches/URLMapperService/conf/test/fulcrumComponentConfiguration.xml Thu Jan 14 11:06:16 2021
@@ -53,8 +53,15 @@
     <parser>
         <parameterEncoding>utf-8</parameterEncoding>
         <automaticUpload>true</automaticUpload>
+        <pool2>
+           <!--  cft. defaults in org.apache.commons.pool2.impl.BaseObjectPoolConfig and GenericKeyedObjectPoolConfig -->
+           <maxTotal>-1</maxTotal><!--  default no limit = -1,  other plausible values 1024, 2048 -->
+           <blockWhenExhausted>true</blockWhenExhausted><!--  default true -->
+           <maxWaitMillis>350</maxWaitMillis><!--  default 0 -->
+           <testOnReturn>true</testOnReturn>
+        </pool2>
     </parser>
-
+    
     <!-- These components belong to the Fulcrum-Security services -->
     <securityService/>
     <authenticator/>

Modified: turbine/core/branches/URLMapperService/src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java
URL: http://svn.apache.org/viewvc/turbine/core/branches/URLMapperService/src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java?rev=1885479&r1=1885478&r2=1885479&view=diff
==============================================================================
--- turbine/core/branches/URLMapperService/src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java (original)
+++ turbine/core/branches/URLMapperService/src/test/org/apache/turbine/services/urlmapper/TurbineURLMapperServiceTest.java Thu Jan 14 11:06:16 2021
@@ -167,11 +167,18 @@ public class TurbineURLMapperServiceTest
             counters.add(i, new AtomicInteger(0));
             counterSum.add(i, new AtomicLong(0l));
         }
-        int calls = 1_000; // above 1000 the experiment begins ..
+        int calls = 10_000; // above 1024, set max total of parser pool2 in fulcrum component configuration   ..
         boolean parallel = false;
         IntStream range = IntStream.range(0, calls);
         if (parallel) range = range.parallel();
         SplittableRandom sr = new SplittableRandom();
+        
+//        range
+//        .peek(e -> System.out.println("current value: " + e))
+//        .forEach( actionInt -> {
+//        	runCheck(templateURIs, counterSum, counters, parallel, sr);
+//        });
+        
         Spliterator.OfInt spliterator1 = range.spliterator();
         Spliterator.OfInt spliterator2 = spliterator1.trySplit();