Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
Showing
8 changed files
with
19 additions
and
42 deletions
| ... | @@ -28,6 +28,10 @@ | ... | @@ -28,6 +28,10 @@ |
| 28 | <version>${project.version}</version> | 28 | <version>${project.version}</version> |
| 29 | </dependency> | 29 | </dependency> |
| 30 | <dependency> | 30 | <dependency> |
| 31 | + <groupId>org.livetribe.slp</groupId> | ||
| 32 | + <artifactId>livetribe-slp</artifactId> | ||
| 33 | + </dependency> | ||
| 34 | + <dependency> | ||
| 31 | <groupId>org.apache.karaf.shell</groupId> | 35 | <groupId>org.apache.karaf.shell</groupId> |
| 32 | <artifactId>org.apache.karaf.shell.console</artifactId> | 36 | <artifactId>org.apache.karaf.shell.console</artifactId> |
| 33 | </dependency> | 37 | </dependency> | ... | ... |
| ... | @@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit; | ... | @@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit; |
| 26 | import java.util.concurrent.TimeoutException; | 26 | import java.util.concurrent.TimeoutException; |
| 27 | 27 | ||
| 28 | import static java.lang.String.format; | 28 | import static java.lang.String.format; |
| 29 | -import static java.lang.System.currentTimeMillis; | ||
| 30 | import static java.lang.System.nanoTime; | 29 | import static java.lang.System.nanoTime; |
| 31 | import static java.lang.System.out; | 30 | import static java.lang.System.out; |
| 32 | import static org.onlab.onos.foo.IOLoopTestServer.PORT; | 31 | import static org.onlab.onos.foo.IOLoopTestServer.PORT; |
| ... | @@ -82,7 +81,7 @@ public class IOLoopTestClient { | ... | @@ -82,7 +81,7 @@ public class IOLoopTestClient { |
| 82 | int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6; | 81 | int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6; |
| 83 | int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000; | 82 | int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000; |
| 84 | int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128; | 83 | int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128; |
| 85 | - int to = args.length > 4 ? Integer.parseInt(args[4]) : 30; | 84 | + int to = args.length > 4 ? Integer.parseInt(args[4]) : 60; |
| 86 | 85 | ||
| 87 | log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ", | 86 | log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ", |
| 88 | wc, mc, ml, ip); | 87 | wc, mc, ml, ip); |
| ... | @@ -186,7 +185,7 @@ public class IOLoopTestClient { | ... | @@ -186,7 +185,7 @@ public class IOLoopTestClient { |
| 186 | */ | 185 | */ |
| 187 | public void report() { | 186 | public void report() { |
| 188 | DecimalFormat f = new DecimalFormat("#,##0"); | 187 | DecimalFormat f = new DecimalFormat("#,##0"); |
| 189 | - out.println(format("Client: %s messages; %s bytes; %s mps; %s Mbs; %s ns latency", | 188 | + out.println(format("Client: %s messages; %s bytes; %s mps; %s MBs; %s ns latency", |
| 190 | f.format(messages.total()), f.format(bytes.total()), | 189 | f.format(messages.total()), f.format(bytes.total()), |
| 191 | f.format(messages.throughput()), | 190 | f.format(messages.throughput()), |
| 192 | f.format(bytes.throughput() / (1024 * msgLength)), | 191 | f.format(bytes.throughput() / (1024 * msgLength)), |
| ... | @@ -218,13 +217,6 @@ public class IOLoopTestClient { | ... | @@ -218,13 +217,6 @@ public class IOLoopTestClient { |
| 218 | 217 | ||
| 219 | messages.add(stream.messagesIn().total()); | 218 | messages.add(stream.messagesIn().total()); |
| 220 | bytes.add(stream.bytesIn().total()); | 219 | bytes.add(stream.bytesIn().total()); |
| 221 | - | ||
| 222 | -// out.println(format("Disconnected client; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps", | ||
| 223 | -// FORMAT.format(stream.messagesIn().throughput()), | ||
| 224 | -// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)), | ||
| 225 | -// FORMAT.format(stream.messagesOut().throughput()), | ||
| 226 | -// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength)))); | ||
| 227 | - | ||
| 228 | stream.messagesOut().reset(); | 220 | stream.messagesOut().reset(); |
| 229 | stream.bytesOut().reset(); | 221 | stream.bytesOut().reset(); |
| 230 | } | 222 | } | ... | ... |
| ... | @@ -23,7 +23,6 @@ import java.util.concurrent.ExecutorService; | ... | @@ -23,7 +23,6 @@ import java.util.concurrent.ExecutorService; |
| 23 | import java.util.concurrent.Executors; | 23 | import java.util.concurrent.Executors; |
| 24 | 24 | ||
| 25 | import static java.lang.String.format; | 25 | import static java.lang.String.format; |
| 26 | -import static java.lang.System.currentTimeMillis; | ||
| 27 | import static java.lang.System.nanoTime; | 26 | import static java.lang.System.nanoTime; |
| 28 | import static java.lang.System.out; | 27 | import static java.lang.System.out; |
| 29 | import static org.onlab.util.Tools.delay; | 28 | import static org.onlab.util.Tools.delay; |
| ... | @@ -157,7 +156,7 @@ public class IOLoopTestServer { | ... | @@ -157,7 +156,7 @@ public class IOLoopTestServer { |
| 157 | */ | 156 | */ |
| 158 | public void report() { | 157 | public void report() { |
| 159 | DecimalFormat f = new DecimalFormat("#,##0"); | 158 | DecimalFormat f = new DecimalFormat("#,##0"); |
| 160 | - out.println(format("Server: %s messages; %s bytes; %s mps; %s Mbs", | 159 | + out.println(format("Server: %s messages; %s bytes; %s mps; %s MBs", |
| 161 | f.format(messages.total()), f.format(bytes.total()), | 160 | f.format(messages.total()), f.format(bytes.total()), |
| 162 | f.format(messages.throughput()), | 161 | f.format(messages.throughput()), |
| 163 | f.format(bytes.throughput() / (1024 * msgLength)))); | 162 | f.format(bytes.throughput() / (1024 * msgLength)))); |
| ... | @@ -197,15 +196,8 @@ public class IOLoopTestServer { | ... | @@ -197,15 +196,8 @@ public class IOLoopTestServer { |
| 197 | @Override | 196 | @Override |
| 198 | protected void removeStream(MessageStream<TestMessage> stream) { | 197 | protected void removeStream(MessageStream<TestMessage> stream) { |
| 199 | super.removeStream(stream); | 198 | super.removeStream(stream); |
| 200 | - | ||
| 201 | messages.add(stream.messagesIn().total()); | 199 | messages.add(stream.messagesIn().total()); |
| 202 | bytes.add(stream.bytesIn().total()); | 200 | bytes.add(stream.bytesIn().total()); |
| 203 | - | ||
| 204 | -// out.println(format("Disconnected server; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps", | ||
| 205 | -// FORMAT.format(stream.messagesIn().throughput()), | ||
| 206 | -// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)), | ||
| 207 | -// FORMAT.format(stream.messagesOut().throughput()), | ||
| 208 | -// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength)))); | ||
| 209 | } | 201 | } |
| 210 | 202 | ||
| 211 | @Override | 203 | @Override | ... | ... |
| ... | @@ -23,7 +23,7 @@ public class TestIOClientCommand extends AbstractShellCommand { | ... | @@ -23,7 +23,7 @@ public class TestIOClientCommand extends AbstractShellCommand { |
| 23 | 23 | ||
| 24 | @Argument(index = 2, name = "messageCount", description = "Message count", | 24 | @Argument(index = 2, name = "messageCount", description = "Message count", |
| 25 | required = false, multiValued = false) | 25 | required = false, multiValued = false) |
| 26 | - String messageCount = "10000000"; | 26 | + String messageCount = "1000000"; |
| 27 | 27 | ||
| 28 | @Argument(index = 3, name = "messageLength", description = "Message length (bytes)", | 28 | @Argument(index = 3, name = "messageLength", description = "Message length (bytes)", |
| 29 | required = false, multiValued = false) | 29 | required = false, multiValued = false) |
| ... | @@ -31,7 +31,7 @@ public class TestIOClientCommand extends AbstractShellCommand { | ... | @@ -31,7 +31,7 @@ public class TestIOClientCommand extends AbstractShellCommand { |
| 31 | 31 | ||
| 32 | @Argument(index = 4, name = "timeoutSecs", description = "Test timeout (seconds)", | 32 | @Argument(index = 4, name = "timeoutSecs", description = "Test timeout (seconds)", |
| 33 | required = false, multiValued = false) | 33 | required = false, multiValued = false) |
| 34 | - String timeoutSecs = "30"; | 34 | + String timeoutSecs = "60"; |
| 35 | 35 | ||
| 36 | @Override | 36 | @Override |
| 37 | protected void execute() { | 37 | protected void execute() { | ... | ... |
| ... | @@ -5,7 +5,7 @@ import java.util.Objects; | ... | @@ -5,7 +5,7 @@ import java.util.Objects; |
| 5 | public final class MastershipTerm { | 5 | public final class MastershipTerm { |
| 6 | 6 | ||
| 7 | private final NodeId master; | 7 | private final NodeId master; |
| 8 | - private int termNumber; | 8 | + private final int termNumber; |
| 9 | 9 | ||
| 10 | private MastershipTerm(NodeId master, int term) { | 10 | private MastershipTerm(NodeId master, int term) { |
| 11 | this.master = master; | 11 | this.master = master; | ... | ... |
| ... | @@ -134,6 +134,12 @@ | ... | @@ -134,6 +134,12 @@ |
| 134 | </dependency> | 134 | </dependency> |
| 135 | 135 | ||
| 136 | <dependency> | 136 | <dependency> |
| 137 | + <groupId>org.livetribe.slp</groupId> | ||
| 138 | + <artifactId>livetribe-slp</artifactId> | ||
| 139 | + <version>2.2.1</version> | ||
| 140 | + </dependency> | ||
| 141 | + | ||
| 142 | + <dependency> | ||
| 137 | <groupId>com.hazelcast</groupId> | 143 | <groupId>com.hazelcast</groupId> |
| 138 | <artifactId>hazelcast</artifactId> | 144 | <artifactId>hazelcast</artifactId> |
| 139 | <version>3.3</version> | 145 | <version>3.3</version> | ... | ... |
| ... | @@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit; | ... | @@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit; |
| 24 | import java.util.concurrent.TimeoutException; | 24 | import java.util.concurrent.TimeoutException; |
| 25 | 25 | ||
| 26 | import static java.lang.String.format; | 26 | import static java.lang.String.format; |
| 27 | -import static java.lang.System.currentTimeMillis; | ||
| 28 | import static java.lang.System.nanoTime; | 27 | import static java.lang.System.nanoTime; |
| 29 | import static java.lang.System.out; | 28 | import static java.lang.System.out; |
| 30 | import static org.onlab.nio.IOLoopTestServer.PORT; | 29 | import static org.onlab.nio.IOLoopTestServer.PORT; |
| ... | @@ -80,7 +79,7 @@ public class IOLoopTestClient { | ... | @@ -80,7 +79,7 @@ public class IOLoopTestClient { |
| 80 | int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6; | 79 | int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6; |
| 81 | int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000; | 80 | int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000; |
| 82 | int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128; | 81 | int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128; |
| 83 | - int to = args.length > 4 ? Integer.parseInt(args[4]) : 30; | 82 | + int to = args.length > 4 ? Integer.parseInt(args[4]) : 60; |
| 84 | 83 | ||
| 85 | log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ", | 84 | log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ", |
| 86 | wc, mc, ml, ip); | 85 | wc, mc, ml, ip); |
| ... | @@ -184,7 +183,7 @@ public class IOLoopTestClient { | ... | @@ -184,7 +183,7 @@ public class IOLoopTestClient { |
| 184 | */ | 183 | */ |
| 185 | public void report() { | 184 | public void report() { |
| 186 | DecimalFormat f = new DecimalFormat("#,##0"); | 185 | DecimalFormat f = new DecimalFormat("#,##0"); |
| 187 | - out.println(format("Client: %s messages; %s bytes; %s mps; %s Mbs; %s ns latency", | 186 | + out.println(format("Client: %s messages; %s bytes; %s mps; %s MBs; %s ns latency", |
| 188 | f.format(messages.total()), f.format(bytes.total()), | 187 | f.format(messages.total()), f.format(bytes.total()), |
| 189 | f.format(messages.throughput()), | 188 | f.format(messages.throughput()), |
| 190 | f.format(bytes.throughput() / (1024 * msgLength)), | 189 | f.format(bytes.throughput() / (1024 * msgLength)), |
| ... | @@ -213,16 +212,8 @@ public class IOLoopTestClient { | ... | @@ -213,16 +212,8 @@ public class IOLoopTestClient { |
| 213 | @Override | 212 | @Override |
| 214 | protected synchronized void removeStream(MessageStream<TestMessage> stream) { | 213 | protected synchronized void removeStream(MessageStream<TestMessage> stream) { |
| 215 | super.removeStream(stream); | 214 | super.removeStream(stream); |
| 216 | - | ||
| 217 | messages.add(stream.messagesIn().total()); | 215 | messages.add(stream.messagesIn().total()); |
| 218 | bytes.add(stream.bytesIn().total()); | 216 | bytes.add(stream.bytesIn().total()); |
| 219 | - | ||
| 220 | -// out.println(format("Disconnected client; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps", | ||
| 221 | -// FORMAT.format(stream.messagesIn().throughput()), | ||
| 222 | -// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)), | ||
| 223 | -// FORMAT.format(stream.messagesOut().throughput()), | ||
| 224 | -// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength)))); | ||
| 225 | - | ||
| 226 | stream.messagesOut().reset(); | 217 | stream.messagesOut().reset(); |
| 227 | stream.bytesOut().reset(); | 218 | stream.bytesOut().reset(); |
| 228 | } | 219 | } | ... | ... |
| ... | @@ -20,7 +20,6 @@ import java.util.concurrent.ExecutorService; | ... | @@ -20,7 +20,6 @@ import java.util.concurrent.ExecutorService; |
| 20 | import java.util.concurrent.Executors; | 20 | import java.util.concurrent.Executors; |
| 21 | 21 | ||
| 22 | import static java.lang.String.format; | 22 | import static java.lang.String.format; |
| 23 | -import static java.lang.System.currentTimeMillis; | ||
| 24 | import static java.lang.System.out; | 23 | import static java.lang.System.out; |
| 25 | import static org.onlab.util.Tools.delay; | 24 | import static org.onlab.util.Tools.delay; |
| 26 | import static org.onlab.util.Tools.namedThreads; | 25 | import static org.onlab.util.Tools.namedThreads; |
| ... | @@ -153,7 +152,7 @@ public class IOLoopTestServer { | ... | @@ -153,7 +152,7 @@ public class IOLoopTestServer { |
| 153 | */ | 152 | */ |
| 154 | public void report() { | 153 | public void report() { |
| 155 | DecimalFormat f = new DecimalFormat("#,##0"); | 154 | DecimalFormat f = new DecimalFormat("#,##0"); |
| 156 | - out.println(format("Server: %s messages; %s bytes; %s mps; %s Mbs", | 155 | + out.println(format("Server: %s messages; %s bytes; %s mps; %s MBs", |
| 157 | f.format(messages.total()), f.format(bytes.total()), | 156 | f.format(messages.total()), f.format(bytes.total()), |
| 158 | f.format(messages.throughput()), | 157 | f.format(messages.throughput()), |
| 159 | f.format(bytes.throughput() / (1024 * msgLength)))); | 158 | f.format(bytes.throughput() / (1024 * msgLength)))); |
| ... | @@ -193,15 +192,8 @@ public class IOLoopTestServer { | ... | @@ -193,15 +192,8 @@ public class IOLoopTestServer { |
| 193 | @Override | 192 | @Override |
| 194 | protected void removeStream(MessageStream<TestMessage> stream) { | 193 | protected void removeStream(MessageStream<TestMessage> stream) { |
| 195 | super.removeStream(stream); | 194 | super.removeStream(stream); |
| 196 | - | ||
| 197 | messages.add(stream.messagesIn().total()); | 195 | messages.add(stream.messagesIn().total()); |
| 198 | bytes.add(stream.bytesIn().total()); | 196 | bytes.add(stream.bytesIn().total()); |
| 199 | - | ||
| 200 | -// out.println(format("Disconnected server; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps", | ||
| 201 | -// FORMAT.format(stream.messagesIn().throughput()), | ||
| 202 | -// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)), | ||
| 203 | -// FORMAT.format(stream.messagesOut().throughput()), | ||
| 204 | -// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength)))); | ||
| 205 | } | 197 | } |
| 206 | 198 | ||
| 207 | @Override | 199 | @Override | ... | ... |
-
Please register or login to post a comment