GUI -- Fixed intent perf GUI styling.
Change-Id: I552d3a50f7f4dd5bb1df7115c15eb6a04f538378
diff --git a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
index 8683f3f..a979b65 100644
--- a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
+++ b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfCollector.java
@@ -37,10 +37,8 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import static org.onlab.util.Tools.groupedThreads;
+import static org.onlab.util.SharedExecutors.getPoolThreadExecutor;
import static org.slf4j.LoggerFactory.getLogger;
/**
@@ -78,18 +76,13 @@
private Map<NodeId, Integer> nodeToIndex;
private NodeId nodeId;
- private ExecutorService messageHandlingExecutor;
@Activate
public void activate() {
nodeId = clusterService.getLocalNode().id();
- // TODO: replace with shared executor
- messageHandlingExecutor = Executors.newSingleThreadExecutor(
- groupedThreads("onos/perf", "message-handler"));
-
communicationService.addSubscriber(SAMPLE, new InternalSampleCollector(),
- messageHandlingExecutor);
+ getPoolThreadExecutor());
nodes = clusterService.getNodes().toArray(new ControllerNode[]{});
Arrays.sort(nodes, (a, b) -> a.id().toString().compareTo(b.id().toString()));
@@ -99,14 +92,13 @@
nodeToIndex.put(nodes[i].id(), i);
}
- ui.setHeaders(getSampleHeaders());
clearSamples();
+ ui.setCollector(this);
log.info("Started");
}
@Deactivate
public void deactivate() {
- messageHandlingExecutor.shutdown();
communicationService.removeSubscriber(SAMPLE);
log.info("Stopped");
}