blob: 3423b23f794c6ff6e8a7da9fcfa30adc4a5ec3c1 [file] [log] [blame]
pankajf49b45e2014-10-07 14:24:22 -07001package org.onlab.onos.foo;
2
3import static org.onlab.onos.foo.SimpleNettyClient.startStandalone;
4
5import org.apache.karaf.shell.commands.Argument;
6import org.apache.karaf.shell.commands.Command;
7import org.onlab.onos.cli.AbstractShellCommand;
8
9/**
10 * Test Netty client performance.
11 */
12@Command(scope = "onos", name = "simple-netty-client",
13 description = "Starts the simple Netty client")
14public class SimpleNettyClientCommand extends AbstractShellCommand {
15
pankajea0acef2014-10-07 15:01:47 -070016 //FIXME: replace these arguments with proper ones needed for the test.
pankajf49b45e2014-10-07 14:24:22 -070017 @Argument(index = 0, name = "serverIp", description = "Server IP address",
18 required = false, multiValued = false)
19 String serverIp = "127.0.0.1";
20
21 @Argument(index = 1, name = "workers", description = "IO workers",
22 required = false, multiValued = false)
23 String workers = "6";
24
25 @Argument(index = 2, name = "messageCount", description = "Message count",
26 required = false, multiValued = false)
27 String messageCount = "1000000";
28
29 @Argument(index = 3, name = "messageLength", description = "Message length (bytes)",
30 required = false, multiValued = false)
31 String messageLength = "128";
32
33 @Argument(index = 4, name = "timeoutSecs", description = "Test timeout (seconds)",
34 required = false, multiValued = false)
35 String timeoutSecs = "60";
36
37 @Override
38 protected void execute() {
39 try {
40 startStandalone(new String[]{serverIp, workers, messageCount, messageLength, timeoutSecs});
41 } catch (Exception e) {
42 error("Unable to start client %s", e);
43 }
44 }
45
46}