Commit 599e6ec9 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Disabled calls to NodeDebugMonitor as they cause huge performance drop

parent 39035536
......@@ -42,7 +42,6 @@ import de.tudarmstadt.maki.simonstrator.api.Event;
import de.tudarmstadt.maki.simonstrator.api.EventHandler;
import de.tudarmstadt.maki.simonstrator.api.Graphs;
import de.tudarmstadt.maki.simonstrator.api.Host;
import de.tudarmstadt.maki.simonstrator.api.NodeDebugMonitor;
import de.tudarmstadt.maki.simonstrator.api.Oracle;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.common.graph.Graph;
......@@ -263,15 +262,18 @@ public class DefaultTopologyComponent implements TopologyComponent {
@Override
public void updateCurrentLocation(Location location) {
position.set(location);
NodeDebugMonitor.update(this.getClass(), getHost().getId(), "Current Location", location);
try {
NodeDebugMonitor.update(this.getClass(), getHost().getId(),
"Distance to target",
location.distanceTo(movementModel.getTargetLocation(this)));
} catch (UnsupportedOperationException e) {
// This is not supported by the movement model (which may happen see
// MovementModel.java - thus catch and ignore)
}
/*
* FIXME utilization of the NodeDebugMonitor leads to huge performance drop.
*/
// NodeDebugMonitor.update(this.getClass(), getHost().getId(), "Current Location", location);
// try {
// NodeDebugMonitor.update(this.getClass(), getHost().getId(),
// "Distance to target",
// location.distanceTo(movementModel.getTargetLocation(this)));
// } catch (UnsupportedOperationException e) {
// // This is not supported by the movement model (which may happen see
// // MovementModel.java - thus catch and ignore)
// }
// notify "non-request" listeners
for (LocationListener locationListener : listeners) {
locationListener.onLocationChanged(getHost(), getLastLocation());
......@@ -282,8 +284,7 @@ public class DefaultTopologyComponent implements TopologyComponent {
public void setTargetAttractionPoint(AttractionPoint targetAttractionPoint)
throws UnsupportedOperationException {
movementModel.changeTargetLocation(this, targetAttractionPoint);
NodeDebugMonitor.update(this.getClass(), getHost().getId(), "Target Location", targetAttractionPoint);
// NodeDebugMonitor.update(this.getClass(), getHost().getId(), "Target Location", targetAttractionPoint);
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment