Add --help option

This commit is contained in:
Tor Lillqvist 2015-04-20 17:30:03 +03:00
parent faec3cd961
commit 84eff99fde

View file

@ -262,35 +262,34 @@ void LoadTest::defineOptions(OptionSet& options)
{ {
Application::defineOptions(options); Application::defineOptions(options);
options.addOption( options.addOption(Option("help", "", "Display help information on command line arguments.")
Option("doclist", "", "file containing URIs or pathnames of documents to load, - for stdin") .required(false)
.required(true) .repeatable(false));
.repeatable(false)
.argument("file"));
options.addOption( options.addOption(Option("doclist", "", "file containing URIs or pathnames of documents to load, - for stdin")
Option("numclients", "", "number of simultaneous clients to simulate") .required(true)
.required(false) .repeatable(false)
.repeatable(false) .argument("file"));
.argument("number"));
options.addOption( options.addOption(Option("numclients", "", "number of simultaneous clients to simulate")
Option("numdocs", "", "number of sequential documents per client") .required(false)
.required(false) .repeatable(false)
.repeatable(false) .argument("number"));
.argument("number"));
options.addOption( options.addOption(Option("numdocs", "", "number of sequential documents per client")
Option("duration", "", "duration in hours") .required(false)
.required(false) .repeatable(false)
.repeatable(false) .argument("number"));
.argument("hours"));
options.addOption( options.addOption(Option("duration", "", "duration in hours")
Option("server", "", "URI of LOOL server") .required(false)
.required(false) .repeatable(false)
.repeatable(false) .argument("hours"));
.argument("uri"));
options.addOption(Option("server", "", "URI of LOOL server")
.required(false)
.repeatable(false)
.argument("uri"));
} }
void LoadTest::handleOption(const std::string& name, const std::string& value) void LoadTest::handleOption(const std::string& name, const std::string& value)