static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); description ("collection", &Collections, "restrict to collection name (can be specified multiple times)") ("batch-size", &ChunkSize, "maximum size for individual data batches (in bytes)") ("dump-data", &DumpData, "dump collection data") ("include-system-collections", &IncludeSystemCollections, "include system collections") ("output-directory", &OutputDirectory, "output directory") ("overwrite", &Overwrite, "overwrite data in output directory") ("progress", &Progress, "show progress") ("tick-start", &TickStart, "only include data after this tick") ("tick-end", &TickEnd, "last tick to be included in data dump") ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, argc, argv, "arangodump.conf"); if (1 == arguments.size()) { OutputDirectory = arguments[0]; } }
static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); description ("collection", &Collections, "restrict to collection name (can be specified multiple times)") ("create-database", &CreateDatabase, "create the target database if it does not exist") ("batch-size", &ChunkSize, "maximum size for individual data batches (in bytes)") ("import-data", &ImportData, "import data into collection") ("recycle-ids", &RecycleIds, "recycle collection and revision ids from dump") ("force", &Force, "continue restore even in the face of some server-side errors") ("create-collection", &ImportStructure, "create collection structure") ("include-system-collections", &IncludeSystemCollections, "include system collections") ("input-directory", &InputDirectory, "input directory") ("overwrite", &Overwrite, "overwrite collections if they exist") ("progress", &Progress, "show progress") ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, "", argc, argv, "arangorestore.conf"); if (1 == arguments.size()) { InputDirectory = arguments[0]; } }
static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); description ("async", &Async, "send asynchronous requests") ("concurrency", &ThreadConcurrency, "number of parallel connections") ("requests", &Operations, "total number of operations") ("batch-size", &BatchSize, "number of operations in one batch (0 disables batching)") ("keep-alive", &KeepAlive, "use HTTP keep-alive") ("collection", &Collection, "collection name to use in tests") ("test-case", &TestCase, "test case to use (possible values: version, document, collection, import-document, hash, skiplist, edge, shapes, shapes-append, random-shapes, crud, crud-append, crud-write-read, aqltrx, counttrx, multitrx, multi-collection, aqlinsert, aqlv8)") ("complexity", &Complexity, "complexity parameter for the test") ("delay", &Delay, "use a startup delay (necessary only when run in series)") ("progress", &Progress, "show progress") ("verbose", &verbose, "print out replies if the http-header indicates db-errors") ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, "--concurrency <concurrency> --requests <request> --test-case <case> ...", argc, argv, "arangob.conf"); }
static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); ProgramOptionsDescription ruby("RUBY options"); ruby ("ruby.directory", &StartupPath, "startup paths containing the Ruby files; multiple directories can be separated by cola") ("ruby.modules-path", &StartupModules, "one or more directories separated by cola") ; description (ruby, false) ; // fill in used options BaseClient.setupGeneral(description); BaseClient.setupServer(description); // and parse the command line and config file ProgramOptions options; BaseClient.parse(options, description, argc, argv, "arangoirb.conf"); // check module path if (StartupModules.empty()) { LOGGER_FATAL_AND_EXIT("module path not known, please use '--ruby.modules-path'"); } }
static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription deprecatedOptions("DEPRECATED options"); deprecatedOptions ("max-upload-size", &ChunkSize, "size for individual data batches (in bytes)") ; ProgramOptionsDescription description("STANDARD options"); description ("file", &FileName, "file name (\"-\" for STDIN)") ("batch-size", &ChunkSize, "size for individual data batches (in bytes)") ("collection", &CollectionName, "collection name") ("create-collection", &CreateCollection, "create collection if it does not yet exist") ("type", &TypeImport, "type of file (\"csv\", \"tsv\", or \"json\")") ("quote", &Quote, "quote character(s)") ("separator", &Separator, "separator") ("progress", &Progress, "show progress") (deprecatedOptions, true) ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, "--file <file> --type <type> --collection <collection>", argc, argv, "arangoimp.conf"); if (FileName == "" && arguments.size() > 0) { FileName = arguments[0]; } }
static void ParseProgramOptions (int argc, char* argv[]) { ProgramOptionsDescription description("STANDARD options"); description ("async", &Async, "send asychronous requests") ("concurrency", &Concurrency, "number of parallel connections") ("requests", &Operations, "total number of operations") ("batch-size", &BatchSize, "number of operations in one batch (0 disables batching)") ("keep-alive", &KeepAlive, "use HTTP keep-alive") ("collection", &Collection, "collection name to use in tests") ("test-case", &TestCase, "test case to use") ("complexity", &Complexity, "complexity parameter for the test") ("delay", &Delay, "use a startup delay (necessary only when run in series)") ("progress", &Progress, "show progress") ; BaseClient.setupGeneral(description); BaseClient.setupServer(description); vector<string> arguments; description.arguments(&arguments); ProgramOptions options; BaseClient.parse(options, description, "--concurrency <concurrency> --requests <request> --test-case <case> ...", argc, argv, "arangob.conf"); }