Brian O'Connor
Committed by Ray Milkey

some updates to intentperfinstaller

Change-Id: Id8826131db5779d1d7c3895d09c47ff55f405cc1
...@@ -72,7 +72,7 @@ public class IntentPerfInstaller { ...@@ -72,7 +72,7 @@ public class IntentPerfInstaller {
72 72
73 //FIXME make this configurable 73 //FIXME make this configurable
74 private static final int NUM_WORKERS = 1; 74 private static final int NUM_WORKERS = 1;
75 - private static final int NUM_KEYS = 20_000; 75 + private static final int NUM_KEYS = 40_000;
76 76
77 public static final int START_DELAY = 5_000; // ms 77 public static final int START_DELAY = 5_000; // ms
78 private static final int REPORT_PERIOD = 5_000; //ms 78 private static final int REPORT_PERIOD = 5_000; //ms
...@@ -189,8 +189,11 @@ public class IntentPerfInstaller { ...@@ -189,8 +189,11 @@ public class IntentPerfInstaller {
189 } 189 }
190 checkState(ingressDevice != null, "There are no local devices"); 190 checkState(ingressDevice != null, "There are no local devices");
191 191
192 + // prefix based on node id
193 + long prefix = ((long) clusterService.getLocalNode().ip().getIp4Address().toInt()) << 32;
192 for (int count = 0, k = firstKey; count < numberOfKeys; k++) { 194 for (int count = 0, k = firstKey; count < numberOfKeys; k++) {
193 - Key key = Key.of(k, appId); 195 + Key key = Key.of(prefix + k, appId);
196 + //FIXME comment this out for spread of keys
194 if (!intentService.isLocal(key)) { 197 if (!intentService.isLocal(key)) {
195 // Bail if the key is not local 198 // Bail if the key is not local
196 continue; 199 continue;
...@@ -302,9 +305,9 @@ public class IntentPerfInstaller { ...@@ -302,9 +305,9 @@ public class IntentPerfInstaller {
302 private void adjustRates() { 305 private void adjustRates() {
303 //FIXME need to iron out the rate adjustment 306 //FIXME need to iron out the rate adjustment
304 if (++cycleCount % 5 == 0) { //TODO: maybe use a timer (we should do this every 5-10 sec) 307 if (++cycleCount % 5 == 0) { //TODO: maybe use a timer (we should do this every 5-10 sec)
305 - if (listener.requestThroughput() - listener.processedThroughput() <= 500 && 308 + if (listener.requestThroughput() - listener.processedThroughput() <= 2000 && //was 500
306 lastDuration <= GOAL_CYCLE_PERIOD) { 309 lastDuration <= GOAL_CYCLE_PERIOD) {
307 - lastCount = Math.min(lastCount + 100, intents.size() / 2); 310 + lastCount = Math.min(lastCount + 1000, intents.size() / 2);
308 } else { 311 } else {
309 lastCount *= 0.8; 312 lastCount *= 0.8;
310 } 313 }
......