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
tom
2014-10-02 21:28:31 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fa70a29a3636d471ea2be5e70c50156cf751a68f
fa70a29a
1 parent
66630c8f
Fixing checkstyle error.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
utils/netty/src/main/java/org/onlab/netty/SimpleClient.java
utils/netty/src/main/java/org/onlab/netty/SimpleClient.java
View file @
fa70a29
...
...
@@ -9,7 +9,8 @@ import org.onlab.metrics.MetricsManager;
import
com.codahale.metrics.Timer
;
public
final
class
SimpleClient
{
private
SimpleClient
()
{}
private
SimpleClient
()
{
}
public
static
void
main
(
String
...
args
)
throws
Exception
{
NettyMessagingService
messaging
=
new
TestNettyMessagingService
(
9081
);
...
...
@@ -29,11 +30,11 @@ public final class SimpleClient {
Timer
sendAndRecieveTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
final
int
iterations
=
1000000
;
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAndRecieveTimer
.
time
();
Response
<
String
>
response
=
messaging
.
sendAndReceive
(
new
Endpoint
(
"localhost"
,
8080
),
"echo"
,
"Hello World"
);
"Hello World"
);
System
.
out
.
println
(
"Got back:"
+
response
.
get
(
2
,
TimeUnit
.
SECONDS
));
context
.
stop
();
}
...
...
Please
register
or
login
to post a comment