Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 14081 invoked from network); 20 Feb 2007 20:08:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 20:08:27 -0000 Received: (qmail 58185 invoked by uid 500); 20 Feb 2007 20:08:36 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 58137 invoked by uid 500); 20 Feb 2007 20:08:36 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 58125 invoked by uid 99); 20 Feb 2007 20:08:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 12:08:36 -0800 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 12:08:27 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id B32DD1A981A; Tue, 20 Feb 2007 12:08:06 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r509729 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/perf/ Date: Tue, 20 Feb 2007 20:08:06 -0000 To: commits@activemq.apache.org From: rajdavies@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070220200806.B32DD1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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