Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
pankaj
2014-10-07 17:38:44 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1a444e9c9c302c145bd11058d785ac7b7396056c
1a444e9c
1 parent
366ce8b1
Run the test longer for realistic measurements
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
View file @
1a444e9
...
...
@@ -38,7 +38,7 @@ public final class SimpleNettyClient {
MetricsComponent
component
=
metrics
.
registerComponent
(
"NettyMessaging"
);
Timer
sendAsyncTimer
=
metrics
.
createTimer
(
component
,
feature
,
"AsyncSender"
);
final
int
warmup
=
100
;
final
int
warmup
=
100
0000
;
for
(
int
i
=
0
;
i
<
warmup
;
i
++)
{
messaging
.
sendAsync
(
new
Endpoint
(
"localhost"
,
8081
),
"simple"
,
"Hello World"
.
getBytes
());
Response
response
=
messaging
...
...
@@ -46,13 +46,12 @@ public final class SimpleNettyClient {
"Hello World"
.
getBytes
());
}
final
int
iterations
=
10000
;
final
int
iterations
=
10000
00000
;
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAsyncTimer
.
time
();
messaging
.
sendAsync
(
new
Endpoint
(
"localhost"
,
8081
),
"simple"
,
"Hello World"
.
getBytes
());
context
.
stop
();
}
metrics
.
registerMetric
(
component
,
feature
,
"AsyncTimer"
,
sendAsyncTimer
);
Timer
sendAndReceiveTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
...
...
@@ -64,7 +63,6 @@ public final class SimpleNettyClient {
// System.out.println("Got back:" + new String(response.get(2, TimeUnit.SECONDS)));
context
.
stop
();
}
metrics
.
registerMetric
(
component
,
feature
,
"PingPong"
,
sendAndReceiveTimer
);
}
public
static
class
TestNettyMessagingService
extends
NettyMessagingService
{
...
...
Please
register
or
login
to post a comment