From f36e0782a5bb5409d8dd95e2d08ffdbd65266663 Mon Sep 17 00:00:00 2001 From: Ryan Goulding Date: Fri, 24 Jun 2016 11:57:00 -0400 Subject: [PATCH] Change count type in the cars model The count type is changed from uint16 to uint32. For some performance/stress tests, it is desirable to issue 1E7 transactions to provide an adequate sample size. Prior to this change, it was impossible to issue a million transactions without either invoking the RPC several times or using count=0 and stopping based on log messages. This makes perf testing easier. Change-Id: Icf125e45bd85e14df6ed5ad91ddad92a8dd2151b Signed-off-by: Ryan Goulding --- .../samples/clustering-test-app/model/src/main/yang/car.yang | 2 +- .../controller/clustering/it/provider/CarProvider.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang b/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang index 35e82039a3..f8c2f5b88c 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang +++ b/opendaylight/md-sal/samples/clustering-test-app/model/src/main/yang/car.yang @@ -71,7 +71,7 @@ module car { } leaf count { - type uint16; + type uint32; default 0; description "Number of cars to create. Zero implies unlimited cars; use stop-stress-test rpc to stop the test."; diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarProvider.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarProvider.java index 9e5e57db11..1ab7f5e901 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarProvider.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/CarProvider.java @@ -75,7 +75,8 @@ public class CarProvider implements CarService { @Override public Future> stressTest(StressTestInput input) { - final int inputRate, inputCount; + final int inputRate; + final long inputCount; // If rate is not provided, or given as zero, then just return. if ((input.getRate() == null) || (input.getRate() == 0)) { -- 2.36.6