Package org.apache.qpid.tools.report

Examples of org.apache.qpid.tools.report.MercuryReporter$MercuryStatistics


    }

    public static void main(String[] args) throws Exception
    {
        TestConfiguration config = new JVMArgConfiguration();
        MercuryReporter reporter= new MercuryReporter(MercuryThroughputAndLatency.class,System.out,10,true);
        String scriptId = (args.length == 1) ? args[0] : "";
        int conCount = config.getConnectionCount();
        final CountDownLatch testCompleted = new CountDownLatch(conCount);
        for (int i=0; i < conCount; i++)
        {
            final MercuryConsumerController cons = new MercuryConsumerController(config, reporter, scriptId + i);
            Runnable r = new Runnable()
            {
                public void run()
                {
                    cons.run();
                    testCompleted.countDown();
                }
            };

            Thread t;
            try
            {
                t = Threading.getThreadFactory().createThread(r);
            }
            catch(Exception e)
            {
                throw new Error("Error creating consumer thread",e);
            }
            t.start();
        }
        testCompleted.await();
        reporter.log("Consumers have completed the test......\n");
    }
View Full Code Here


    }

    public static void main(String[] args) throws Exception
    {
        TestConfiguration config = new JVMArgConfiguration();
        MercuryReporter reporter= new MercuryReporter(MercuryThroughput.class,System.out,10,true);
        String scriptId = (args.length == 1) ? args[0] : "";
        int conCount = config.getConnectionCount();
        final CountDownLatch testCompleted = new CountDownLatch(conCount);
        for (int i=0; i < conCount; i++)
        {
            final MercuryProducerController prod = new MercuryProducerController(config, reporter, scriptId + i);
            prod.startControllerIfNeeded();
            Runnable r = new Runnable()
            {
                public void run()
                {
                    prod.run();
                    testCompleted.countDown();
                }
            };

            Thread t;
            try
            {
                t = Threading.getThreadFactory().createThread(r);
            }
            catch(Exception e)
            {
                throw new Error("Error creating producer thread",e);
            }
            t.start();
        }
        testCompleted.await();
        reporter.log("Producers have completed the test......");
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.tools.report.MercuryReporter$MercuryStatistics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.