/* Web Polygraph http://www.web-polygraph.org/ * (C) 2003-2006 The Measurement Factory * Licensed under the Apache License, Version 2.0 */ #include "base/polygraph.h" #include "xstd/Select.h" #include "xstd/Poll.h" #include "runtime/SharedOpts.h" #include "runtime/globals.h" SharedOpts TheOpts; SharedOpts::SharedOpts(): theHelpOpt(this, "help", "list of options"), theVersOpt(this, "version", "package version info"), theHostTypeOpt(this, "host_type", "package build environment info"), theVerbLevel(this, "verb_lvl ", "console verbosity level", 0), theDumpFlags(this, "dump ", "dump request/replies/errors headers/bodies to console"), theDumpSize(this, "dump_size ", "limit size of individual msg dump", Size::KB(1)), theNotifAddr(this, "notify ", "send notifications to a [remote] monitoring program", NetAddr()), theBeepDoormanListAt(this,"doorman_listen_at ","where to listen for (and respond to) meta-information requests", NetAddr()), theBeepDoormanSendTo(this,"doorman_send_to ","where to forward meta-information", NetAddr()), theRunLabel(this, "label ", "run label"), theFDLimit(this, "fd_limit ", "decrease default fd limit"), theCfgFileName(this, "config ", "configuration file name"), theCfgDirs(this, "cfg_dirs ", "directories to search for cfg files"), theConsFileName(this, "console ", "redirect console output", "-"), theLogFileName(this, "log ", "log file for samples"), theLogBufSize(this, "log_buf_size ","buffer size for binary log"), doStoreWorkSet(this, "store_working_set ", "store working set"), doLoadWorkSet(this, "load_working_set ", "load working set"), theSmplLogFileName(this,"sample_log ", "detailed binary log file"), theSmplLogBufSize(this, "sample_log_buf_size ","buffer size for sample log"), acceptForeignMsgs(this,"accept_foreign_msgs", "accept foreign requests or responses", false), theStatCycleLen(this, "stats_cycle