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-03 07:07:06 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0d1feb263c8ab4f0e35193cb0cea94dca4f1218f
0d1feb26
1 parent
a1d16b65
fixed typo
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
utils/netty/src/main/java/org/onlab/netty/SimpleClient.java
utils/netty/src/main/java/org/onlab/netty/SimpleClient.java
View file @
0d1feb2
...
...
@@ -28,18 +28,17 @@ public final class SimpleClient {
}
metrics
.
registerMetric
(
component
,
feature
,
"AsyncTimer"
,
sendAsyncTimer
);
Timer
sendAndRec
ie
veTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
Timer
sendAndRec
ei
veTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
final
int
iterations
=
1000000
;
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAndRec
ie
veTimer
.
time
();
Timer
.
Context
context
=
sendAndRec
ei
veTimer
.
time
();
Response
<
String
>
response
=
messaging
.
sendAndReceive
(
new
Endpoint
(
"localhost"
,
8080
),
"echo"
,
"Hello World"
);
System
.
out
.
println
(
"Got back:"
+
response
.
get
(
2
,
TimeUnit
.
SECONDS
));
context
.
stop
();
}
metrics
.
registerMetric
(
component
,
feature
,
"AsyncTimer"
,
sendAndRecieveTimer
);
metrics
.
registerMetric
(
component
,
feature
,
"AsyncTimer"
,
sendAndReceiveTimer
);
}
public
static
class
TestNettyMessagingService
extends
NettyMessagingService
{
...
...
Please
register
or
login
to post a comment