Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
599e6ec9
Commit
599e6ec9
authored
Aug 04, 2017
by
Björn Richerzhagen
Browse files
Disabled calls to NodeDebugMonitor as they cause huge performance drop
parent
39035536
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/DefaultTopologyComponent.java
View file @
599e6ec9
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment