Author: tolusha
Date: 2009-12-29 08:38:10 -0500 (Tue, 29 Dec 2009)
New Revision: 1235
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/perf/TestGetNodesPerf.java
Log:
EXOJCR-271: test modified
Modified:
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/perf/TestGetNodesPerf.java
===================================================================
---
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/perf/TestGetNodesPerf.java 2009-12-29
13:34:34 UTC (rev 1234)
+++
jcr/branches/1.12.0-OPT/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/load/perf/TestGetNodesPerf.java 2009-12-29
13:38:10 UTC (rev 1235)
@@ -35,10 +35,12 @@
{
private static final String testName = "testRoot";
- private static final int sessionCount = 1;
+ private static final int sessionCount = 100;
- private static final int tryCount = 1;
+ private static final int nodesCount = 50000;
+ private static final int timesCount = 5;
+
private Session[] sessions = new Session[sessionCount];
private GetNodesThread[] threads = new GetNodesThread[sessionCount];
@@ -54,7 +56,6 @@
session.save();
log.info("adding...");
- int nodesCount = 50000;
for (int i = 0; i < nodesCount; i++)
{
testRoot.addNode("_" + i + "_node");
@@ -70,7 +71,7 @@
long usedMemory = rt.totalMemory() - rt.freeMemory();
log.info("getting nodes...");
- for (int k = 0; k < tryCount; k++)
+ for (int k = 0; k < timesCount; k++)
{
for (int i = 0; i < sessionCount; i++)
{
@@ -119,6 +120,10 @@
long startTime = System.currentTimeMillis();
nodes = testRoot.getNodes();
+ while (nodes.hasNext())
+ {
+ nodes.next();
+ }
log.info("Total time: " + (System.currentTimeMillis() - startTime)
+ "ms");
}
Show replies by date