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-10 17:50:55 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6245a7a2985665af192c8602ca79dde893cb01e1
6245a7a2
1 parent
d2054d4d
Reverse the order of test to unblock the channel from async tests
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
View file @
6245a7a
package
org
.
onlab
.
onos
.
foo
;
import
static
java
.
lang
.
Thread
.
sleep
;
import
java.io.IOException
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -79,15 +81,6 @@ private static Logger log = LoggerFactory.getLogger(SimpleNettyClient.class);
response
.
get
(
100000
,
TimeUnit
.
MILLISECONDS
);
}
log
.
info
(
"measuring async sender"
);
Timer
sendAsyncTimer
=
metrics
.
createTimer
(
component
,
feature
,
"AsyncSender"
);
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAsyncTimer
.
time
();
messaging
.
sendAsync
(
endpoint
,
"simple"
,
"Hello World"
.
getBytes
());
context
.
stop
();
}
log
.
info
(
"measuring round-trip send & receive"
);
Timer
sendAndReceiveTimer
=
metrics
.
createTimer
(
component
,
feature
,
"SendAndReceive"
);
int
timeouts
=
0
;
...
...
@@ -108,6 +101,17 @@ private static Logger log = LoggerFactory.getLogger(SimpleNettyClient.class);
}
// System.out.println("Got back:" + new String(response.get(2, TimeUnit.SECONDS)));
}
sleep
(
1000
);
log
.
info
(
"measuring async sender"
);
Timer
sendAsyncTimer
=
metrics
.
createTimer
(
component
,
feature
,
"AsyncSender"
);
for
(
int
i
=
0
;
i
<
iterations
;
i
++)
{
Timer
.
Context
context
=
sendAsyncTimer
.
time
();
messaging
.
sendAsync
(
endpoint
,
"simple"
,
"Hello World"
.
getBytes
());
context
.
stop
();
}
sleep
(
1000
);
}
public
static
void
stop
()
{
...
...
apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java
View file @
6245a7a
...
...
@@ -25,7 +25,7 @@ public class SimpleNettyClientCommand extends AbstractShellCommand {
@Argument
(
index
=
2
,
name
=
"warmupCount"
,
description
=
"Warm-up count"
,
required
=
false
,
multiValued
=
false
)
String
warmupCount
=
"1000
0
"
;
String
warmupCount
=
"1000"
;
@Argument
(
index
=
3
,
name
=
"messageCount"
,
description
=
"Message count"
,
required
=
false
,
multiValued
=
false
)
...
...
Please
register
or
login
to post a comment