adding measurement logs to Plan(Calc|Install)Runtime
Change-Id: I856555a8bcbb28649e9341fd3ebe2b733faba5e2
diff --git a/src/main/java/net/onrc/onos/intent/runtime/PlanCalcRuntime.java b/src/main/java/net/onrc/onos/intent/runtime/PlanCalcRuntime.java
index 4a5ca37..b12711a 100644
--- a/src/main/java/net/onrc/onos/intent/runtime/PlanCalcRuntime.java
+++ b/src/main/java/net/onrc/onos/intent/runtime/PlanCalcRuntime.java
@@ -39,8 +39,14 @@
}
public List<Set<FlowEntry>> computePlan(IntentOperationList intentOps) {
+ long start = System.nanoTime();
Set<Collection<FlowEntry>> flowEntries = computeFlowEntries(intentOps);
- return buildPhases(flowEntries);
+ long step1 = System.nanoTime();
+ List<Set<FlowEntry>> plan = buildPhases(flowEntries);
+ long step2 = System.nanoTime();
+ log.error("MEASUREMENT: Compute flow entries: {} ns, Build phases: {} ns",
+ (step1 - start), (step2 - step1));
+ return plan;
}
private Set<Collection<FlowEntry>> computeFlowEntries(IntentOperationList intentOps) {