mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-24 22:01:02 +02:00
Default numbers are more saner now
This commit is contained in:
parent
1a444e9c9c
commit
4face4049c
@ -36,9 +36,8 @@ public final class SimpleNettyClient {
|
|||||||
metrics.activate();
|
metrics.activate();
|
||||||
MetricsFeature feature = new MetricsFeature("latency");
|
MetricsFeature feature = new MetricsFeature("latency");
|
||||||
MetricsComponent component = metrics.registerComponent("NettyMessaging");
|
MetricsComponent component = metrics.registerComponent("NettyMessaging");
|
||||||
Timer sendAsyncTimer = metrics.createTimer(component, feature, "AsyncSender");
|
|
||||||
|
|
||||||
final int warmup = 1000000;
|
final int warmup = 10000;
|
||||||
for (int i = 0; i < warmup; i++) {
|
for (int i = 0; i < warmup; i++) {
|
||||||
messaging.sendAsync(new Endpoint("localhost", 8081), "simple", "Hello World".getBytes());
|
messaging.sendAsync(new Endpoint("localhost", 8081), "simple", "Hello World".getBytes());
|
||||||
Response response = messaging
|
Response response = messaging
|
||||||
@ -46,15 +45,16 @@ public final class SimpleNettyClient {
|
|||||||
"Hello World".getBytes());
|
"Hello World".getBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
final int iterations = 1000000000;
|
Timer sendAsyncTimer = metrics.createTimer(component, feature, "AsyncSender");
|
||||||
|
Timer sendAndReceiveTimer = metrics.createTimer(component, feature, "SendAndReceive");
|
||||||
|
|
||||||
|
final int iterations = 10000000;
|
||||||
for (int i = 0; i < iterations; i++) {
|
for (int i = 0; i < iterations; i++) {
|
||||||
Timer.Context context = sendAsyncTimer.time();
|
Timer.Context context = sendAsyncTimer.time();
|
||||||
messaging.sendAsync(new Endpoint("localhost", 8081), "simple", "Hello World".getBytes());
|
messaging.sendAsync(new Endpoint("localhost", 8081), "simple", "Hello World".getBytes());
|
||||||
context.stop();
|
context.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer sendAndReceiveTimer = metrics.createTimer(component, feature, "SendAndReceive");
|
|
||||||
|
|
||||||
for (int i = 0; i < iterations; i++) {
|
for (int i = 0; i < iterations; i++) {
|
||||||
Timer.Context context = sendAndReceiveTimer.time();
|
Timer.Context context = sendAndReceiveTimer.time();
|
||||||
Response response = messaging
|
Response response = messaging
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user