Examples of ProgressPrinter


Examples of com.cloudloop.client.cli.util.ProgressPrinter

        toObj = CliUtil.extractObject( path, preferDirectory );
      }
    }

    // print copy progress if we're copying across stores
    ProgressPrinter progressPrinter = null;
        assert fromObj != null;
        assert toObj != null;
        if (!fromObj.getParentStore( ).equals( toObj.getParentStore( ) ))
    {
      fromObj.refreshMetadata( );
      progressPrinter = new ProgressPrinter( out );
    }

    if (fromObj.getStoreObjectType( ) == CloudStoreObjectType.DIRECTORY)
    {
      if (toObj.getStoreObjectType( ) != CloudStoreObjectType.DIRECTORY)
View Full Code Here

Examples of com.cloudloop.client.cli.util.ProgressPrinter

          toObj = CliUtil.extractObject( path, preferDirectory );
        }
    }
   
    // print copy progress if we're copying across stores
    ProgressPrinter progressPrinter = null;
        assert fromObj != null;
        assert toObj != null;
        if ( !args.hasFlag("quiet") && !fromObj.getParentStore( ).equals( toObj.getParentStore(   )) )
    {
      fromObj.refreshMetadata( );
      progressPrinter = new ProgressPrinter( out );
    }
   
    if ( fromObj.getStoreObjectType( ) == CloudStoreObjectType.DIRECTORY )
    {
        if ( toObj.getStoreObjectType( ) != CloudStoreObjectType.DIRECTORY )
View Full Code Here

Examples of org.apache.activemq.broker.ProgressPrinter

    }
   
    public void testQueueSendThenAddConsumer() throws Exception {
        int MESSAGE_SIZE=1024*64;
        int PRODUCE_COUNT=10000;
        ProgressPrinter printer = new ProgressPrinter(PRODUCE_COUNT, 20);
  
        ActiveMQDestination destination = new ActiveMQQueue("TEST");
       
        connection.setUseCompression(false);
        connection.getPrefetchPolicy().setAll(10);
        connection.start();
        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
        MessageProducer producer = session.createProducer(destination);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);

        log.info("Sending "+ PRODUCE_COUNT+" messages that are "+(MESSAGE_SIZE/1024.0)+"k large, for a total of "+(PRODUCE_COUNT*MESSAGE_SIZE/(1024.0*1024.0))+" megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for( int i=0; i < PRODUCE_COUNT; i++) {
            printer.increment();
            BytesMessage  msg = session.createBytesMessage();
            msg.writeBytes(new byte[MESSAGE_SIZE]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();
       
        log.info("Produced messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
       
        printer = new ProgressPrinter(PRODUCE_COUNT, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for( int i=0; i < PRODUCE_COUNT; i++) {
            printer.increment();
            assertNotNull("Getting message: "+i,consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        log.info("Consumed messages/sec: "+ (PRODUCE_COUNT*1000.0/(end1-start)));
       
View Full Code Here

Examples of org.apache.activemq.broker.ProgressPrinter

        factory.setUseAsyncSend(true);
        return factory;
    }

    public void testQueueSendThenAddConsumer() throws Exception {
        ProgressPrinter printer = new ProgressPrinter(produceCount, 20);

        ActiveMQDestination destination = new ActiveMQQueue("TEST");

        connection.setUseCompression(false);
        connection.getPrefetchPolicy().setAll(10);
        connection.start();
        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
        MessageProducer producer = session.createProducer(destination);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();

        LOG.info("Produced messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

Examples of org.apache.activemq.broker.ProgressPrinter

        factory.setUseAsyncSend(true);
        return factory;
    }

    public void testQueueSendThenAddConsumer() throws Exception {
        ProgressPrinter printer = new ProgressPrinter(produceCount, 20);

        ActiveMQDestination destination = new ActiveMQQueue("TEST");

        connection.setUseCompression(false);
        connection.getPrefetchPolicy().setAll(10);
        connection.start();
        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
        MessageProducer producer = session.createProducer(destination);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();

        LOG.info("Produced messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

Examples of org.apache.activemq.broker.ProgressPrinter

        factory.setUseAsyncSend(true);
        return factory;
    }

    public void testQueueSendThenAddConsumer() throws Exception {
        ProgressPrinter printer = new ProgressPrinter(produceCount, 20);

        ActiveMQDestination destination = new ActiveMQQueue("TEST");

        connection.setUseCompression(false);
        connection.getPrefetchPolicy().setAll(10);
        connection.start();
        Session session = connection.createSession(false, Session.DUPS_OK_ACKNOWLEDGE);
        MessageProducer producer = session.createProducer(destination);
        producer.setDeliveryMode(DeliveryMode.PERSISTENT);

        LOG.info("Sending " + produceCount + " messages that are " + (messageSize / 1024.0) + "k large, for a total of " + (produceCount * messageSize / (1024.0 * 1024.0))
                 + " megs of data.");
        // Send a message to the broker.
        long start = System.currentTimeMillis();
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            BytesMessage msg = session.createBytesMessage();
            msg.writeBytes(new byte[messageSize]);
            producer.send(msg);
        }
        long end1 = System.currentTimeMillis();

        LOG.info("Produced messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

        printer = new ProgressPrinter(produceCount, 10);
        start = System.currentTimeMillis();
        MessageConsumer consumer = session.createConsumer(destination);
        for (int i = 0; i < produceCount; i++) {
            printer.increment();
            assertNotNull("Getting message: " + i, consumer.receive(20000));
        }
        end1 = System.currentTimeMillis();
        LOG.info("Consumed messages/sec: " + (produceCount * 1000.0 / (end1 - start)));

View Full Code Here

Examples of weave.utils.ProgressManager.ProgressPrinter

    try
    {
      try
      {
        PrintStream ps = new PrintStream(getServletOutputStream());
        ProgressPrinter pp = new ProgressPrinter(ps);
        WeaveConfig.initializeAdminService(pp.getProgressManager());
      }
      catch (IOException e)
      {
        throw new RemoteException("Unable to initialize admin service", e);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.