[jboss-cvs] JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader ...
Manik Surtani
manik at jboss.org
Wed May 23 06:28:54 EDT 2007
User: msurtani
Date: 07/05/23 06:28:54
Modified: tests/perf/org/jboss/cache/manualtests/cacheloader
Benchmark.java OneConnectionFactory.java
BenchmarkRunner.java BaseBenchmark.java
Log:
Initiated a bunch of performance fixes, including replacing CopyOnWriteArraySets with org.jboss.cache.util.concurrent.ConcurrentHashSet.
Also ran an imports optimiser on the code base - there were a lot of unused imports floating about.
Revision Changes Path
1.2 +119 -117 JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/Benchmark.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Benchmark.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/Benchmark.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- Benchmark.java 10 Feb 2007 17:47:02 -0000 1.1
+++ Benchmark.java 23 May 2007 10:28:54 -0000 1.2
@@ -1,18 +1,20 @@
package org.jboss.cache.manualtests.cacheloader;
-import org.jboss.cache.loader.*;
-import org.jboss.cache.Fqn;
import org.jboss.cache.CacheImpl;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.loader.CacheLoader;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
/**
* Defines the algorithm used for measuring performance. The actual operation that will be investigated is defined
* in a subclass. Buidls a homogeneous tree structure of configurable depth, each node having the same number
* of chlidren and the same associated attribute map. The persisted tree represents the fixture for the benchmak-ed
* operation.
- *
+ * <p/>
* Benchmarks are runed through {@link BenchmarkRunner}
*
* @author Mircea.Markus at iquestint.com
1.3 +48 -47 JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/OneConnectionFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OneConnectionFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/OneConnectionFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- OneConnectionFactory.java 5 Mar 2007 21:10:53 -0000 1.2
+++ OneConnectionFactory.java 23 May 2007 10:28:54 -0000 1.3
@@ -1,11 +1,11 @@
package org.jboss.cache.manualtests.cacheloader;
-import org.jboss.cache.loader.ConnectionFactory;
import org.jboss.cache.loader.AdjListJDBCCacheLoaderConfig;
+import org.jboss.cache.loader.ConnectionFactory;
import java.sql.Connection;
-import java.sql.SQLException;
import java.sql.DriverManager;
+import java.sql.SQLException;
/**
* Gives only one connection all the time. There is no need for pooling as all the operations are performed
@@ -58,7 +58,8 @@
try
{
conn.close();
- } catch (SQLException e)
+ }
+ catch (SQLException e)
{
e.printStackTrace();
}
1.2 +33 -25 JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/BenchmarkRunner.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BenchmarkRunner.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/BenchmarkRunner.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- BenchmarkRunner.java 10 Feb 2007 17:47:02 -0000 1.1
+++ BenchmarkRunner.java 23 May 2007 10:28:54 -0000 1.2
@@ -1,7 +1,15 @@
package org.jboss.cache.manualtests.cacheloader;
-import org.jboss.cache.manualtests.cacheloader.newimpl.*;
-import org.jboss.cache.manualtests.cacheloader.oldimpl.*;
+import org.jboss.cache.manualtests.cacheloader.newimpl.ChildrenNamesNewBenchmark;
+import org.jboss.cache.manualtests.cacheloader.newimpl.ExistsNewBenchmark;
+import org.jboss.cache.manualtests.cacheloader.newimpl.GetAttributesNewBenchmark;
+import org.jboss.cache.manualtests.cacheloader.newimpl.LoadNewBenchmark;
+import org.jboss.cache.manualtests.cacheloader.newimpl.RemoveNewBenchmark;
+import org.jboss.cache.manualtests.cacheloader.oldimpl.ChildrenNamesOldBenchmark;
+import org.jboss.cache.manualtests.cacheloader.oldimpl.ExistsOldBenchmark;
+import org.jboss.cache.manualtests.cacheloader.oldimpl.GetAttributesOldBenchmark;
+import org.jboss.cache.manualtests.cacheloader.oldimpl.LoadOldBenchmark;
+import org.jboss.cache.manualtests.cacheloader.oldimpl.RemoveOldBenchmark;
/**
* Entry point for running the benchmarks. The benchmark to be run are defined here, see "benchmark" static field.
1.2 +103 -98 JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/BaseBenchmark.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BaseBenchmark.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/manualtests/cacheloader/BaseBenchmark.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- BaseBenchmark.java 10 Feb 2007 17:47:02 -0000 1.1
+++ BaseBenchmark.java 23 May 2007 10:28:54 -0000 1.2
@@ -1,19 +1,24 @@
package org.jboss.cache.manualtests.cacheloader;
import org.jboss.cache.Fqn;
+import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.xml.XmlHelper;
-import org.jboss.cache.config.CacheLoaderConfig;
import org.w3c.dom.Element;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
/**
* Implements the common operations.
- * @see Benchmark
*
* @author Mircea.Markus at iquestint.com
* @version 1.0
+ * @see Benchmark
*/
public abstract class BaseBenchmark extends Benchmark
{
More information about the jboss-cvs-commits
mailing list