You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2009/10/19 16:31:20 UTC
svn commit: r826689 [2/2] - in /activemq/sandbox/activemq-flow/hawtdb/src:
main/java/org/apache/hawtdb/api/ main/java/org/apache/hawtdb/internal/index/
main/java/org/apache/hawtdb/internal/page/
test/java/org/apache/hawtdb/internal/ test/java/org/apach...
Modified: activemq/sandbox/activemq-flow/hawtdb/src/test/java/org/apache/hawtdb/internal/page/TransactionBenchmarker.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/hawtdb/src/test/java/org/apache/hawtdb/internal/page/TransactionBenchmarker.java?rev=826689&r1=826688&r2=826689&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/hawtdb/src/test/java/org/apache/hawtdb/internal/page/TransactionBenchmarker.java (original)
+++ activemq/sandbox/activemq-flow/hawtdb/src/test/java/org/apache/hawtdb/internal/page/TransactionBenchmarker.java Mon Oct 19 14:31:19 2009
@@ -23,8 +23,8 @@
import org.apache.hawtdb.internal.Action;
import org.apache.hawtdb.internal.Benchmarker;
import org.apache.hawtdb.internal.Benchmarker.BenchmarkAction;
-import org.apache.hawtdb.internal.page.ConcurrentPageFile;
-import org.apache.hawtdb.internal.page.ConcurrentPageFileFactory;
+import org.apache.hawtdb.internal.page.HawtPageFile;
+import org.apache.hawtdb.internal.page.HawtPageFileFactory;
/**
*
@@ -33,14 +33,14 @@
public class TransactionBenchmarker<A extends TransactionActor<A>> {
public interface Callback {
- public void run(ConcurrentPageFileFactory pff) throws Exception;
+ public void run(HawtPageFileFactory pff) throws Exception;
}
private Callback setup;
private Callback tearDown;
public void benchmark(int actorCount, BenchmarkAction<A> action) throws Exception {
- ConcurrentPageFileFactory pff = new ConcurrentPageFileFactory();
+ HawtPageFileFactory pff = new HawtPageFileFactory();
pff.setFile(new File("target/test-data/" + getClass().getName() + ".db"));
pff.getFile().delete();
pff.open();
@@ -48,7 +48,7 @@
if( setup!=null ) {
setup.run(pff);
}
- ConcurrentPageFile pf = pff.getConcurrentPageFile();
+ HawtPageFile pf = pff.getConcurrentPageFile();
Benchmarker benchmark = new Benchmarker();
benchmark.setName(action.getName());
ArrayList<A> actors = createActors(pf, actorCount, action);
@@ -71,7 +71,7 @@
return metrics;
}
- protected ArrayList<A> createActors(ConcurrentPageFile pageFile, int count, Action<A> action) {
+ protected ArrayList<A> createActors(HawtPageFile pageFile, int count, Action<A> action) {
ArrayList<A> actors = new ArrayList<A>();
for (int i = 0; i < count; i++) {
A actor = createActor(pageFile, action, i);
@@ -84,7 +84,7 @@
}
@SuppressWarnings("unchecked")
- protected A createActor(ConcurrentPageFile pageFile, Action<A> action, int i) {
+ protected A createActor(HawtPageFile pageFile, Action<A> action, int i) {
return (A) new TransactionActor();
}