[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java
User: pra Date: 02/03/06 09:34:13 Modified:src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java Log: Some small changes Revision ChangesPath 1.4 +8 -4 jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java Index: JBossMQPerfStressTestCase.java === RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- JBossMQPerfStressTestCase.java20 Sep 2001 01:06:30 - 1.3 +++ JBossMQPerfStressTestCase.java6 Mar 2002 17:34:12 - 1.4 @@ -105,7 +105,8 @@ long startTime = System.currentTimeMillis(); for (int i = 0; i iterationCount; i++) { - sender.send(queue, message, persistence, 4, 0); + //sender.send(queue, message, persistence, 4, 0); + sender.send(message, persistence, 4, 0); //getLog().debug( Sent #+i); if (transacted == TRANS_INDIVIDUAL) { @@ -233,7 +234,8 @@ long startTime = System.currentTimeMillis(); for (int i = 0; i iterationCount; i++) { - publisher.publish(topic, message, persistence, 4, 0); + publisher.publish(message, persistence, 4, 0); + //publisher.publish(topic, message, persistence, 4, 0); //getLog().debug( Sent #+i); if (transacted == TRANS_INDIVIDUAL) { @@ -357,7 +359,8 @@ long startTime = System.currentTimeMillis(); for (int i = 0; i iterationCount; i++) { - sender.send(queue, message, persistence, 4, 0); + sender.send( message, persistence, 4, 0); + //sender.send(queue, message, persistence, 4, 0); //getLog().debug( Sent #+i); if (transacted == TRANS_INDIVIDUAL) { @@ -486,7 +489,8 @@ long startTime = System.currentTimeMillis(); for (int i = 0; i iterationCount; i++) { - publisher.publish(topic, message, persistence, 4, 0); + publisher.publish(message, persistence, 4, 0); + //publisher.publish(topic, message, persistence, 4, 0); //getLog().debug( Sent #+i); if (transacted == TRANS_INDIVIDUAL) { ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java
User: d_jencks Date: 01/09/19 12:16:54 Modified:src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java Log: Changed stress tests to have counts set from build.xml. You may set values in a local.properties file. Revision ChangesPath 1.2 +712 -527 jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java Index: JBossMQPerfStressTestCase.java === RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JBossMQPerfStressTestCase.java2001/09/12 04:55:39 1.1 +++ JBossMQPerfStressTestCase.java2001/09/19 19:16:54 1.2 @@ -1,546 +1,731 @@ /* - * Copyright (c) 2000 Hiram Chirino [EMAIL PROTECTED] + * JBoss, the OpenSource J2EE webOS * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Distributable under LGPL license. + * See terms of license at gnu.org. */ package org.jboss.test.jbossmq.perf; +import java.util.*; +import javax.jms.*; import javax.naming.*; -import javax.jms.*; -import java.util.*; +import org.apache.log4j.Category; + +import org.jboss.test.JBossTestCase; /** - * JBossMQPerfStressTestCase.java - * - * Some simple tests of JBossMQ + * JBossMQPerfStressTestCase.java Some simple tests of JBossMQ * * @author * @version */ + +public class JBossMQPerfStressTestCase extends JBossTestCase +{ -public class JBossMQPerfStressTestCase extends junit.framework.TestCase { - - // Provider specific - static String TOPIC_FACTORY = ConnectionFactory; - static String QUEUE_FACTORY = ConnectionFactory; - - static String TEST_QUEUE = queue/testQueue; - static String TEST_TOPIC = topic/testTopic; - - static int PERFORMANCE_TEST_ITERATIONS = 1000; - static byte[] PERFORMANCE_TEST_DATA_PAYLOAD = new byte[10*1024]; - - static int TRANS_NONE = 0; - static int TRANS_INDIVIDUAL = 1; - static int TRANS_TOTAL = 2; - static String[] TRANS_DESC = {NOT, individually, totally}; - - //JMSProviderAdapter providerAdapter; - static Context context; - static QueueConnection queueConnection; - static TopicConnection topicConnection; - - public JBossMQPerfStressTestCase(String name) throws Exception{ - super(name); - } - - - // Emptys out all the messages in a queue - private void drainQueue() throws Exception { - - QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - Queue queue = (Queue)context.lookup(TEST_QUEUE); - - QueueReceiver receiver = session.createReceiver(queue); - Message message = receiver.receive( 2000 ); - int c=0; - while( message != null ) { - message = receiver.receive( 2000 ); - c++; - } - - if( c!=0 ) - System.out.println( Drained +c+ messages from the queue); - - session.close(); - - } - - private void waitForSynchMessage() throws Exception { - QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - Queue queue = (Queue)context.lookup(TEST_QUEUE); - - QueueReceiver receiver = session.createReceiver(queue); - receiver.receive(); - session.close(); - } - - private void sendSynchMessage() throws Exception { - QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - Queue queue = (Queue)context.lookup(TEST_QUEUE); - - QueueSender sender = session.createSender(queue); - - Message message = session.createMessage(); - sender.send(message); - - session.close(); -
[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java
User: dmaplesden Date: 01/09/19 18:06:30 Modified:src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java Log: change new InitialContext to getInitialContext Revision ChangesPath 1.3 +1 -1 jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java Index: JBossMQPerfStressTestCase.java === RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JBossMQPerfStressTestCase.java2001/09/19 19:16:54 1.2 +++ JBossMQPerfStressTestCase.java2001/09/20 01:06:30 1.3 @@ -667,7 +667,7 @@ if (context == null) { - context = new InitialContext(); + context = getInitialContext(); QueueConnectionFactory queueFactory = (QueueConnectionFactory)context.lookup(QUEUE_FACTORY); queueConnection = queueFactory.createQueueConnection(); ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jbosstest/src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java Main.java
User: d_jencks Date: 01/09/11 21:55:39 Added: src/main/org/jboss/test/jbossmq/perf JBossMQPerfStressTestCase.java Removed: src/main/org/jboss/test/jbossmq/perf Main.java Log: Changed naming scheme of tests to *UnitTestCase.java for short running tests and *StressTestCase.java for lengthy tests. Made tests-unit and tests-stress targets in build.xml Revision ChangesPath 1.1 jbosstest/src/main/org/jboss/test/jbossmq/perf/JBossMQPerfStressTestCase.java Index: JBossMQPerfStressTestCase.java === /* * Copyright (c) 2000 Hiram Chirino [EMAIL PROTECTED] * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.jboss.test.jbossmq.perf; import javax.naming.*; import javax.jms.*; import java.util.*; /** * JBossMQPerfStressTestCase.java * * Some simple tests of JBossMQ * * @author * @version */ public class JBossMQPerfStressTestCase extends junit.framework.TestCase { // Provider specific static String TOPIC_FACTORY = ConnectionFactory; static String QUEUE_FACTORY = ConnectionFactory; static String TEST_QUEUE = queue/testQueue; static String TEST_TOPIC = topic/testTopic; static int PERFORMANCE_TEST_ITERATIONS = 1000; static byte[] PERFORMANCE_TEST_DATA_PAYLOAD = new byte[10*1024]; static int TRANS_NONE = 0; static int TRANS_INDIVIDUAL = 1; static int TRANS_TOTAL = 2; static String[] TRANS_DESC = {NOT, individually, totally}; //JMSProviderAdapter providerAdapter; static Context context; static QueueConnection queueConnection; static TopicConnection topicConnection; public JBossMQPerfStressTestCase(String name) throws Exception{ super(name); } // Emptys out all the messages in a queue private void drainQueue() throws Exception { QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = (Queue)context.lookup(TEST_QUEUE); QueueReceiver receiver = session.createReceiver(queue); Message message = receiver.receive( 2000 ); int c=0; while( message != null ) { message = receiver.receive( 2000 ); c++; } if( c!=0 ) System.out.println( Drained +c+ messages from the queue); session.close(); } private void waitForSynchMessage() throws Exception { QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = (Queue)context.lookup(TEST_QUEUE); QueueReceiver receiver = session.createReceiver(queue); receiver.receive(); session.close(); } private void sendSynchMessage() throws Exception { QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); Queue queue = (Queue)context.lookup(TEST_QUEUE); QueueSender sender = session.createSender(queue); Message message = session.createMessage(); sender.send(message); session.close(); } static public void main ( String []args ) { String newArgs[] = { org.jboss.test.jbossmq.perf.JBossMQPerfStressTestCase }; junit.swingui.TestRunner.main(newArgs); } public void runAsynchQueuePerformance(final int transacted, final int persistence) throws Exception { { queueConnection.start(); drainQueue(); queueConnection.stop(); } Thread sendThread