From 84eff99fde0af8b885d254c57712b45c137cbb50 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 20 Apr 2015 17:30:03 +0300 Subject: [PATCH] Add --help option --- loolwsd/LoadTest.cpp | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/loolwsd/LoadTest.cpp b/loolwsd/LoadTest.cpp index aff7cbbd8..4c4da0d28 100644 --- a/loolwsd/LoadTest.cpp +++ b/loolwsd/LoadTest.cpp @@ -262,35 +262,34 @@ void LoadTest::defineOptions(OptionSet& options) { Application::defineOptions(options); - options.addOption( - Option("doclist", "", "file containing URIs or pathnames of documents to load, - for stdin") - .required(true) - .repeatable(false) - .argument("file")); + options.addOption(Option("help", "", "Display help information on command line arguments.") + .required(false) + .repeatable(false)); - options.addOption( - Option("numclients", "", "number of simultaneous clients to simulate") - .required(false) - .repeatable(false) - .argument("number")); + options.addOption(Option("doclist", "", "file containing URIs or pathnames of documents to load, - for stdin") + .required(true) + .repeatable(false) + .argument("file")); - options.addOption( - Option("numdocs", "", "number of sequential documents per client") - .required(false) - .repeatable(false) - .argument("number")); + options.addOption(Option("numclients", "", "number of simultaneous clients to simulate") + .required(false) + .repeatable(false) + .argument("number")); - options.addOption( - Option("duration", "", "duration in hours") - .required(false) - .repeatable(false) - .argument("hours")); + options.addOption(Option("numdocs", "", "number of sequential documents per client") + .required(false) + .repeatable(false) + .argument("number")); - options.addOption( - Option("server", "", "URI of LOOL server") - .required(false) - .repeatable(false) - .argument("uri")); + options.addOption(Option("duration", "", "duration in hours") + .required(false) + .repeatable(false) + .argument("hours")); + + 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)