GUI -- Fixed intent perf GUI styling.
Change-Id: I552d3a50f7f4dd5bb1df7115c15eb6a04f538378
diff --git a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
index 96f2b32..909f3a5 100644
--- a/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
+++ b/apps/test/intent-perf/src/main/java/org/onosproject/intentperf/IntentPerfInstaller.java
@@ -156,7 +156,7 @@
private ExecutorService workers;
private ApplicationId appId;
private Listener listener;
- private boolean stopped;
+ private boolean stopped = true;
private Timer reportTimer;
@@ -247,13 +247,18 @@
}
public void start() {
- communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, START.getBytes()));
- startTestRun();
+ if (stopped) {
+ stopped = false;
+ communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, START.getBytes()));
+ startTestRun();
+ }
}
public void stop() {
- communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, STOP.getBytes()));
- stopTestRun();
+ if (!stopped) {
+ communicationService.broadcast(new ClusterMessage(nodeId, CONTROL, STOP.getBytes()));
+ stopTestRun();
+ }
}
private void logConfig(String prefix) {
@@ -282,7 +287,6 @@
}
private void stopTestRun() {
- stopped = true;
if (reporterTask != null) {
reporterTask.cancel();
reporterTask = null;
@@ -293,6 +297,11 @@
} catch (InterruptedException e) {
log.warn("Failed to stop worker", e);
}
+
+ sampleCollector.recordSample(0, 0);
+ sampleCollector.recordSample(0, 0);
+ stopped = true;
+
log.info("Stopped test run");
}