Skip to content

Commit

Permalink
add JFR event for forward checking
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe1st committed Sep 3, 2024
1 parent 4032922 commit 0169ab4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.github.danthe1st.arebac.gpeval;

import jdk.jfr.Category;
import jdk.jfr.Description;
import jdk.jfr.Event;
import jdk.jfr.Name;

@Name("io.github.danthe1st.arebac.gpeval.ForwardCheckingEvent")
@Description("running forward checking")
@Category("AReBAC")
class ForwardCheckingEvent extends Event {

}
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ private void filterMutualExclusionConstraintWithSpecificCandidate(Set<GPNode> ex
}

private boolean forwardChecking(GPNode currentNode, Map<GPNode, Set<GPNode>> incomingConflicts, Set<GPNode> outgoingConflicts) {
ForwardCheckingEvent forwardCheckingEvent = new ForwardCheckingEvent();
forwardCheckingEvent.begin();
List<RelevantEdge> relevantEdges = getRelevantEdges(currentNode);
for(RelevantEdge relevantEdge : relevantEdges){
GPNode otherNode = relevantEdge.otherNode();
Expand All @@ -290,6 +292,7 @@ private boolean forwardChecking(GPNode currentNode, Map<GPNode, Set<GPNode>> inc
}
}
}
forwardCheckingEvent.commit();

return true;
}
Expand Down

0 comments on commit 0169ab4

Please sign in to comment.