Explorar o código

Disables Performance example

Andreas T. Meyer-Berg %!s(int64=5) %!d(string=hai) anos
pai
achega
dbdbd47f9f

+ 5 - 4
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/Main.java

@@ -73,9 +73,9 @@ public class Main {
 		conf = controller.getSettingsController();
 		sim = controller.getSimulationController();
 	    //initializeTest();
-	    //initializeMQTTTest();
+	    initializeMQTTTest();
 	    //initializeUserStudy();
-		initializePerformanceTest();
+		//initializePerformanceTest();
 		//Test packetCapture
 	    //sim.getPacketCaptureController().addPacketCollector(new PacketCollector(new SimplePacketSniffer()));
 	    v = new MainFrame(controller);
@@ -87,6 +87,7 @@ public class Main {
 	    
 	}
 	
+	@SuppressWarnings("unused")
 	private static void initializePerformanceTest(){
 		SmartDevice tic = new SmartDevice("Tic");
 		tic.setX(100);
@@ -244,9 +245,9 @@ public class Main {
 	/**
 	 * Initializes a basic test Network, which contains a few SmartDevices, one Link and one Connection
 	 */
-	@SuppressWarnings("unused")
+	//@SuppressWarnings("unused")
 	private static void initializeMQTTTest(){
-		Link link = new SimpleLink("LossLess TCP-Network");
+		Link link = new SimpleLink("WIFI");
 		
 		SmartDevice broker = new SmartDevice("MQTT-Broker");
 		broker.setX((int)(Math.random()*conf.getWidth()-2*conf.getDeviceVisualizationRadius())+conf.getDeviceVisualizationRadius());

+ 5 - 3
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/core/SimulationManager.java

@@ -69,10 +69,10 @@ public class SimulationManager extends Observable {
 	 */
 	private PacketExportManager exportMan;
 	
-	/**
+	/*
 	 * Peformance Eval
 	 */
-	private long perfStart = 0;
+	//private long perfStart = 0;
 	
 	/**
 	 * Creates a new Simulationmanager
@@ -165,7 +165,7 @@ public class SimulationManager extends Observable {
 	 * Start the simulation
 	 */
 	public void startSimulation() {
-		perfStart=System.currentTimeMillis();
+		//perfStart=System.currentTimeMillis();
 		timer.start();
 		notifyPanels();
 	}
@@ -175,9 +175,11 @@ public class SimulationManager extends Observable {
 	 */
 	public void stopSimulation() {
 		timer.stop();
+		/*
 		long perfEnd = System.currentTimeMillis();
 		long duration = perfEnd - perfStart;
 		System.out.println("Duration: "+duration/1000.0);
+		*/
 		notifyPanels();
 	}