mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 02:11:38 +02:00
Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next
This commit is contained in:
commit
c900440376
@ -27,6 +27,10 @@
|
||||
<artifactId>onlab-nio</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.livetribe.slp</groupId>
|
||||
<artifactId>livetribe-slp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.shell</groupId>
|
||||
<artifactId>org.apache.karaf.shell.console</artifactId>
|
||||
|
@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.currentTimeMillis;
|
||||
import static java.lang.System.nanoTime;
|
||||
import static java.lang.System.out;
|
||||
import static org.onlab.onos.foo.IOLoopTestServer.PORT;
|
||||
@ -82,7 +81,7 @@ public class IOLoopTestClient {
|
||||
int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6;
|
||||
int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000;
|
||||
int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128;
|
||||
int to = args.length > 4 ? Integer.parseInt(args[4]) : 30;
|
||||
int to = args.length > 4 ? Integer.parseInt(args[4]) : 60;
|
||||
|
||||
log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ",
|
||||
wc, mc, ml, ip);
|
||||
@ -186,7 +185,7 @@ public class IOLoopTestClient {
|
||||
*/
|
||||
public void report() {
|
||||
DecimalFormat f = new DecimalFormat("#,##0");
|
||||
out.println(format("Client: %s messages; %s bytes; %s mps; %s Mbs; %s ns latency",
|
||||
out.println(format("Client: %s messages; %s bytes; %s mps; %s MBs; %s ns latency",
|
||||
f.format(messages.total()), f.format(bytes.total()),
|
||||
f.format(messages.throughput()),
|
||||
f.format(bytes.throughput() / (1024 * msgLength)),
|
||||
@ -218,13 +217,6 @@ public class IOLoopTestClient {
|
||||
|
||||
messages.add(stream.messagesIn().total());
|
||||
bytes.add(stream.bytesIn().total());
|
||||
|
||||
// out.println(format("Disconnected client; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps",
|
||||
// FORMAT.format(stream.messagesIn().throughput()),
|
||||
// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)),
|
||||
// FORMAT.format(stream.messagesOut().throughput()),
|
||||
// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength))));
|
||||
|
||||
stream.messagesOut().reset();
|
||||
stream.bytesOut().reset();
|
||||
}
|
||||
|
@ -23,7 +23,6 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.currentTimeMillis;
|
||||
import static java.lang.System.nanoTime;
|
||||
import static java.lang.System.out;
|
||||
import static org.onlab.util.Tools.delay;
|
||||
@ -157,7 +156,7 @@ public class IOLoopTestServer {
|
||||
*/
|
||||
public void report() {
|
||||
DecimalFormat f = new DecimalFormat("#,##0");
|
||||
out.println(format("Server: %s messages; %s bytes; %s mps; %s Mbs",
|
||||
out.println(format("Server: %s messages; %s bytes; %s mps; %s MBs",
|
||||
f.format(messages.total()), f.format(bytes.total()),
|
||||
f.format(messages.throughput()),
|
||||
f.format(bytes.throughput() / (1024 * msgLength))));
|
||||
@ -197,15 +196,8 @@ public class IOLoopTestServer {
|
||||
@Override
|
||||
protected void removeStream(MessageStream<TestMessage> stream) {
|
||||
super.removeStream(stream);
|
||||
|
||||
messages.add(stream.messagesIn().total());
|
||||
bytes.add(stream.bytesIn().total());
|
||||
|
||||
// out.println(format("Disconnected server; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps",
|
||||
// FORMAT.format(stream.messagesIn().throughput()),
|
||||
// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)),
|
||||
// FORMAT.format(stream.messagesOut().throughput()),
|
||||
// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -23,7 +23,7 @@ public class TestIOClientCommand extends AbstractShellCommand {
|
||||
|
||||
@Argument(index = 2, name = "messageCount", description = "Message count",
|
||||
required = false, multiValued = false)
|
||||
String messageCount = "10000000";
|
||||
String messageCount = "1000000";
|
||||
|
||||
@Argument(index = 3, name = "messageLength", description = "Message length (bytes)",
|
||||
required = false, multiValued = false)
|
||||
@ -31,7 +31,7 @@ public class TestIOClientCommand extends AbstractShellCommand {
|
||||
|
||||
@Argument(index = 4, name = "timeoutSecs", description = "Test timeout (seconds)",
|
||||
required = false, multiValued = false)
|
||||
String timeoutSecs = "30";
|
||||
String timeoutSecs = "60";
|
||||
|
||||
@Override
|
||||
protected void execute() {
|
||||
|
@ -5,7 +5,7 @@ import java.util.Objects;
|
||||
public final class MastershipTerm {
|
||||
|
||||
private final NodeId master;
|
||||
private int termNumber;
|
||||
private final int termNumber;
|
||||
|
||||
private MastershipTerm(NodeId master, int term) {
|
||||
this.master = master;
|
||||
|
6
pom.xml
6
pom.xml
@ -133,6 +133,12 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.livetribe.slp</groupId>
|
||||
<artifactId>livetribe-slp</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.hazelcast</groupId>
|
||||
<artifactId>hazelcast</artifactId>
|
||||
|
@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.currentTimeMillis;
|
||||
import static java.lang.System.nanoTime;
|
||||
import static java.lang.System.out;
|
||||
import static org.onlab.nio.IOLoopTestServer.PORT;
|
||||
@ -80,7 +79,7 @@ public class IOLoopTestClient {
|
||||
int wc = args.length > 1 ? Integer.parseInt(args[1]) : 6;
|
||||
int mc = args.length > 2 ? Integer.parseInt(args[2]) : 50 * 1000000;
|
||||
int ml = args.length > 3 ? Integer.parseInt(args[3]) : 128;
|
||||
int to = args.length > 4 ? Integer.parseInt(args[4]) : 30;
|
||||
int to = args.length > 4 ? Integer.parseInt(args[4]) : 60;
|
||||
|
||||
log.info("Setting up client with {} workers sending {} {}-byte messages to {} server... ",
|
||||
wc, mc, ml, ip);
|
||||
@ -184,7 +183,7 @@ public class IOLoopTestClient {
|
||||
*/
|
||||
public void report() {
|
||||
DecimalFormat f = new DecimalFormat("#,##0");
|
||||
out.println(format("Client: %s messages; %s bytes; %s mps; %s Mbs; %s ns latency",
|
||||
out.println(format("Client: %s messages; %s bytes; %s mps; %s MBs; %s ns latency",
|
||||
f.format(messages.total()), f.format(bytes.total()),
|
||||
f.format(messages.throughput()),
|
||||
f.format(bytes.throughput() / (1024 * msgLength)),
|
||||
@ -213,16 +212,8 @@ public class IOLoopTestClient {
|
||||
@Override
|
||||
protected synchronized void removeStream(MessageStream<TestMessage> stream) {
|
||||
super.removeStream(stream);
|
||||
|
||||
messages.add(stream.messagesIn().total());
|
||||
bytes.add(stream.bytesIn().total());
|
||||
|
||||
// out.println(format("Disconnected client; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps",
|
||||
// FORMAT.format(stream.messagesIn().throughput()),
|
||||
// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)),
|
||||
// FORMAT.format(stream.messagesOut().throughput()),
|
||||
// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength))));
|
||||
|
||||
stream.messagesOut().reset();
|
||||
stream.bytesOut().reset();
|
||||
}
|
||||
|
@ -20,7 +20,6 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static java.lang.System.currentTimeMillis;
|
||||
import static java.lang.System.out;
|
||||
import static org.onlab.util.Tools.delay;
|
||||
import static org.onlab.util.Tools.namedThreads;
|
||||
@ -153,7 +152,7 @@ public class IOLoopTestServer {
|
||||
*/
|
||||
public void report() {
|
||||
DecimalFormat f = new DecimalFormat("#,##0");
|
||||
out.println(format("Server: %s messages; %s bytes; %s mps; %s Mbs",
|
||||
out.println(format("Server: %s messages; %s bytes; %s mps; %s MBs",
|
||||
f.format(messages.total()), f.format(bytes.total()),
|
||||
f.format(messages.throughput()),
|
||||
f.format(bytes.throughput() / (1024 * msgLength))));
|
||||
@ -193,15 +192,8 @@ public class IOLoopTestServer {
|
||||
@Override
|
||||
protected void removeStream(MessageStream<TestMessage> stream) {
|
||||
super.removeStream(stream);
|
||||
|
||||
messages.add(stream.messagesIn().total());
|
||||
bytes.add(stream.bytesIn().total());
|
||||
|
||||
// out.println(format("Disconnected server; inbound %s mps, %s Mbps; outbound %s mps, %s Mbps",
|
||||
// FORMAT.format(stream.messagesIn().throughput()),
|
||||
// FORMAT.format(stream.bytesIn().throughput() / (1024 * msgLength)),
|
||||
// FORMAT.format(stream.messagesOut().throughput()),
|
||||
// FORMAT.format(stream.bytesOut().throughput() / (1024 * msgLength))));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user