activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r509729 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/
Date Tue, 20 Feb 2007 20:08:06 GMT
Author: rajdavies
Date: Tue Feb 20 12:08:05 2007
New Revision: 509729

URL: http://svn.apache.org/viewvc?view=rev&rev=509729
Log:
testlets of performance

Added:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
  (with props)
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
  (with props)
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
  (with props)
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
  (with props)
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
  (with props)
Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java

Added: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java?view=auto&rev=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
(added)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
Tue Feb 20 12:08:05 2007
@@ -0,0 +1,36 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements. See the NOTICE
+ * file distributed with this work for additional information regarding copyright ownership.
The ASF licenses this file
+ * to You under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the
+ * License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+package org.apache.activemq.perf;
+
+import java.io.File;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.amq.AMQPersistenceAdapter;
+import org.apache.activemq.store.quick.QuickPersistenceAdapter;
+
+/**
+ * @version $Revision: 1.3 $
+ */
+public class AMQStoreDurableTopicTest extends SimpleDurableTopicTest{
+
+   
+    protected void configureBroker(BrokerService answer) throws Exception{
+        File dataFileDir=new File("activemq-data/perfTest/amqdb");
+        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
+        adaptor.setDirectory(dataFileDir);
+        answer.setPersistenceAdapter(adaptor);
+        answer.addConnector(bindAddress);
+        answer.setDeleteAllMessagesOnStartup(true);
+    }
+}

Propchange: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreDurableTopicTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java?view=auto&rev=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
(added)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
Tue Feb 20 12:08:05 2007
@@ -0,0 +1,43 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.perf;
+
+import java.io.File;
+
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.amq.AMQPersistenceAdapter;
+/**
+ * @version $Revision: 1.3 $
+ */
+public class AMQStoreQueueTest extends SimpleQueueTest{
+    
+        
+    protected void configureBroker(BrokerService answer) throws Exception{
+        
+    	File dataFileDir = new File("activemq-data/perfTest/amq");
+    	
+        AMQPersistenceAdapter adaptor = new AMQPersistenceAdapter();
+        adaptor.setDirectory(dataFileDir);
+        
+        answer.setPersistenceAdapter(adaptor);
+        answer.addConnector(bindAddress);
+        answer.setDeleteAllMessagesOnStartup(true);
+        
+    }
+
+}

Propchange: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/AMQStoreQueueTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java?view=auto&rev=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
(added)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
Tue Feb 20 12:08:05 2007
@@ -0,0 +1,52 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.perf;
+
+import java.io.File;
+import org.apache.activeio.journal.active.JournalImpl;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.journal.JournalPersistenceAdapter;
+import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
+/**
+ * @version $Revision: 1.3 $
+ */
+public class JournalKahaDurableTopicTest extends SimpleDurableTopicTest {
+    
+    
+    
+protected void configureBroker(BrokerService answer) throws Exception{
+        
+        File dataFileDir = new File("activemq-data/perfTest");
+        File journalDir = new File(dataFileDir, "journal").getCanonicalFile();
+        JournalImpl journal = new JournalImpl(journalDir, 3, 1024*1024*20);
+        
+        KahaPersistenceAdapter kahaAdaptor = new KahaPersistenceAdapter(new File(dataFileDir,
"kaha"));
+        JournalPersistenceAdapter journalAdaptor = new JournalPersistenceAdapter(journal,
kahaAdaptor, answer.getTaskRunnerFactory());
+        journalAdaptor.setMaxCheckpointWorkers(1);
+        
+        answer.setPersistenceAdapter(journalAdaptor);
+        answer.addConnector(bindAddress);
+        answer.setDeleteAllMessagesOnStartup(true);
+        
+    }
+
+    
+
+    
+
+}

Propchange: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/JournalKahaDurableTopicTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java?view=auto&rev=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
(added)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
Tue Feb 20 12:08:05 2007
@@ -0,0 +1,35 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements. See the NOTICE
+ * file distributed with this work for additional information regarding copyright ownership.
The ASF licenses this file
+ * to You under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the
+ * License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+package org.apache.activemq.perf;
+
+import java.io.File;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.store.quick.QuickPersistenceAdapter;
+
+/**
+ * @version $Revision: 1.3 $
+ */
+public class QuickStoreDurableTopicTest extends SimpleDurableTopicTest{
+
+   
+    protected void configureBroker(BrokerService answer) throws Exception{
+        File dataFileDir=new File("activemq-data/perfTest");
+        QuickPersistenceAdapter adaptor=new QuickPersistenceAdapter();
+        adaptor.setDirectory(dataFileDir);
+        answer.setPersistenceAdapter(adaptor);
+        answer.addConnector(bindAddress);
+        answer.setDeleteAllMessagesOnStartup(true);
+    }
+}

Propchange: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/QuickStoreDurableTopicTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java?view=diff&rev=509729&r1=509728&r2=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SimpleTopicTest.java
Tue Feb 20 12:08:05 2007
@@ -34,17 +34,17 @@
     protected BrokerService broker;
     // protected String
     // bindAddress="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=false";
-    protected String bindAddress="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=true";
+    //protected String bindAddress="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=true&jms.useAsyncSend=true";
     // protected String
     // bindAddress="tcp://localhost:61616?wireFormat.cacheEnabled=true&wireFormat.tightEncodingEnabled=false";
     // protected String bindAddress="vm://localhost?marshal=true";
-    // protected String bindAddress="vm://localhost";
+    protected String bindAddress="vm://localhost";
     protected PerfProducer[] producers;
     protected PerfConsumer[] consumers;
     protected String DESTINATION_NAME=getClass().getName();
-    protected int SAMPLE_COUNT=30;
-    protected long SAMPLE_INTERVAL=2000;
-    protected int NUMBER_OF_CONSUMERS=1;
+    protected int SAMPLE_COUNT=20;
+    protected long SAMPLE_INTERVAL=1000;
+    protected int NUMBER_OF_CONSUMERS=0;
     protected int NUMBER_OF_PRODUCERS=1;
     protected int PAYLOAD_SIZE=1024;
     protected byte[] array=null;

Added: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java?view=auto&rev=509729
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
(added)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
Tue Feb 20 12:08:05 2007
@@ -0,0 +1,44 @@
+/**
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
agreements. See the NOTICE
+ * file distributed with this work for additional information regarding copyright ownership.
The ASF licenses this file
+ * to You under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the
+ * License. You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the
+ * specific language governing permissions and limitations under the License.
+ */
+
+package org.apache.activemq.perf;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.DeliveryMode;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.ActiveMQPrefetchPolicy;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.xbean.BrokerFactoryBean;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+/**
+ * @version $Revision: 1.3 $
+ */
+public class SlowDurableConsumerTopicTest extends SlowConsumerTopicTest{
+
+    protected PerfConsumer[] slowConsumers;
+    protected int NUMBER_OF_SLOW_CONSUMERS=1;
+
+    
+
+    protected PerfConsumer createSlowConsumer(ConnectionFactory fac,Destination dest,int
number) throws JMSException{
+        return new SlowConsumer(fac,dest,"durableSlowConsumer"+number);
+    }
+
+    
+}
+

Propchange: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/SlowDurableConsumerTopicTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message