From 1902a4e4967c54c7b0206a4d6665462b94a8e66b Mon Sep 17 00:00:00 2001 From: Jan Vales Date: Mon, 10 Jun 2013 22:22:11 +0200 Subject: [PATCH] readded starttime for benchmarking. --- .../sbc/valesriegler/group/GroupAgent.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/main/java/at/ac/tuwien/sbc/valesriegler/group/GroupAgent.java b/src/main/java/at/ac/tuwien/sbc/valesriegler/group/GroupAgent.java index 97fcd67..af2418c 100644 --- a/src/main/java/at/ac/tuwien/sbc/valesriegler/group/GroupAgent.java +++ b/src/main/java/at/ac/tuwien/sbc/valesriegler/group/GroupAgent.java @@ -1,5 +1,20 @@ package at.ac.tuwien.sbc.valesriegler.group; +import java.lang.management.ManagementFactory; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.concurrent.atomic.AtomicLong; + +import javax.jms.JMSException; +import javax.swing.SwingUtilities; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import at.ac.tuwien.sbc.valesriegler.common.Util; import at.ac.tuwien.sbc.valesriegler.group.gui.DeliveryOverviewModel; import at.ac.tuwien.sbc.valesriegler.group.gui.GroupCreationDetailsRequest; @@ -14,13 +29,6 @@ import at.ac.tuwien.sbc.valesriegler.types.GroupData; import at.ac.tuwien.sbc.valesriegler.types.Order; import at.ac.tuwien.sbc.valesriegler.types.PizzaType; import at.ac.tuwien.sbc.valesriegler.xvsm.GroupAgentXVSM; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.jms.JMSException; -import javax.swing.*; -import java.lang.management.ManagementFactory; -import java.util.*; /** * The Main class of the Group component. @@ -49,6 +57,11 @@ public class GroupAgent { public static GroupAgent groupAgent; + /** + * Benchmarkstuff + */ + public static AtomicLong startTime = new AtomicLong(); + public static void main(String[] args) { if (args.length < 1) { throw new IllegalArgumentException(USAGE); @@ -71,7 +84,7 @@ public class GroupAgent { if (!Util.runSimulation) { groupGui = new GroupGUI(); SwingUtilities.invokeLater(groupGui); - } else if(Util.useJMS) { + } else if (Util.useJMS) { JMSGroupConnector.getConnectors().put("tcp://localhost:61621?jms.prefetchPolicy.all=1", new JMSGroupConnector("tcp://localhost:61621?jms.prefetchPolicy.all=1")); JMSGroupConnector.getConnectors().put("tcp://localhost:61622?jms.prefetchPolicy.all=1", -- 2.43.0