package demo.benchmark;

import demo.benchmark.database.DatabaseServer;
import demo.benchmark.enums.MessageBrokerType;
import demo.benchmark.enums.Protocol;
import org.apache.commons.lang3.StringUtils;

import javax.jms.JMSException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class MessagingProvidersBenchmarkMain {

    public static void main(String[] args) throws Exception {
        MessageBrokerType type = MessageBrokerType.isValid(System.getProperty("broker_type"));
        Protocol protocol = Protocol.isValid(System.getProperty("protocol"));
        AbstractMessageBroker messageBroker = new MessageBrokerConnectionFactory().createMessageBroker(type, protocol);
        DatabaseServer databaseServer = new DatabaseServer();
        int totalIterations = messageBroker.numberOfIterations;
        messageBroker.setDbServer(databaseServer);
        for (int i = 1; i <= totalIterations; i++) {
            messageBroker.init(i);
            messageBroker.enqueue();
            messageBroker.dequeue();
            messageBroker.waitForThreadPoolTermination();
        }
        messageBroker.closeConnection();
        databaseServer.printResults(totalIterations);
        databaseServer.close();
    }

}

@@ -153,169 +153,8 @@
 col;
-%0Aimport org.apache.commons.lang3.StringUtils;%0A%0Aimport javax.jms.JMSException;%0Aimport java.util.concurrent.ExecutorService;%0Aimport java.util.concurrent.Executors;
 %0A%0Apu

Remove unused imports