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 18:05:52 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4face4049cda420ea065ce3f11c39f2e4c96702d
4face404
1 parent
1a444e9c
Default numbers are more saner now
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 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 @
4face40
...
...
@@ -36,9 +36,8 @@ public final class SimpleNettyClient {
metrics
.
activate
();
MetricsFeature
feature
=
new
MetricsFeature
(
"latency"
);
MetricsComponent
component
=
metrics
.
registerComponent
(
"NettyMessaging"
);
Timer
sendAsyncTimer
=
metrics
.
createTimer
(
component
,
feature
,
"AsyncSender"
);
final
int
warmup
=
10000
00
;
final
int
warmup
=
10000
;
for
(
int
i
=
0
;
i
<
warmup
;
i
++)
{
messaging
.
sendAsync
(
new
Endpoint
(
"localhost"
,
8081
),
"simple"
,
"Hello World"
.
getBytes
());
Response
response
=
messaging
...
...
@@ -46,15 +45,16 @@ public final class SimpleNettyClient {
"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
++)
{
Timer
.
Context
context
=
sendAsyncTimer
.
time
();
messaging
.
sendAsync
(
new
Endpoint
(
"localhost"
,
8081
),
"simple"
,
"Hello World"
.
getBytes
());
context
.
stop
();
}
Timer
sendAndReceiveTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAndReceiveTimer
.
time
();
Response
response
=
messaging
...
...
Please
register
or
login
to post a comment