Struct goose::config::GooseConfiguration
source · [−]pub struct GooseConfiguration {Show 51 fields
pub help: bool,
pub version: bool,
pub list: bool,
pub host: String,
pub users: Option<usize>,
pub hatch_rate: Option<String>,
pub startup_time: String,
pub run_time: String,
pub goose_log: String,
pub log_level: u8,
pub quiet: u8,
pub verbose: u8,
pub running_metrics: Option<usize>,
pub no_reset_metrics: bool,
pub no_metrics: bool,
pub no_transaction_metrics: bool,
pub no_print_metrics: bool,
pub no_error_summary: bool,
pub report_file: String,
pub no_granular_report: bool,
pub request_log: String,
pub request_format: Option<GooseLogFormat>,
pub request_body: bool,
pub transaction_log: String,
pub transaction_format: Option<GooseLogFormat>,
pub error_log: String,
pub error_format: Option<GooseLogFormat>,
pub debug_log: String,
pub debug_format: Option<GooseLogFormat>,
pub no_debug_body: bool,
pub no_status_codes: bool,
pub no_telnet: bool,
pub telnet_host: String,
pub telnet_port: u16,
pub no_websocket: bool,
pub websocket_host: String,
pub websocket_port: u16,
pub no_autostart: bool,
pub no_gzip: bool,
pub timeout: Option<String>,
pub co_mitigation: Option<GooseCoordinatedOmissionMitigation>,
pub throttle_requests: usize,
pub sticky_follow: bool,
pub manager: bool,
pub expect_workers: Option<usize>,
pub no_hash_check: bool,
pub manager_bind_host: String,
pub manager_bind_port: u16,
pub worker: bool,
pub manager_host: String,
pub manager_port: u16,
/* private fields */
}
Expand description
Runtime options available when launching a Goose load test.
Custom defaults can be programmatically set for most of these options using the
GooseDefaults
structure.
Help is generated for all of these options by passing a -h
flag to an application
built with the Goose Library. For example, using the following command from within the
Goose source tree to run the included simple
example:
cargo run --example simple -- -h
Goose will generate the following output from the GooseConfiguration
structure:
Usage: target/debug/examples/simple [OPTIONS]
Runtime options available when launching a Goose load test.
Optional arguments:
-h, --help Displays this help
-V, --version Prints version information
-l, --list Lists all transactions and exits
-H, --host HOST Defines host to load test (ie http://10.21.32.33)
-u, --users USERS Sets concurrent users (default: number of CPUs)
-r, --hatch-rate RATE Sets per-second user hatch rate (default: 1)
-s, --startup-time TIME Starts users for up to (30s, 20m, 3h, 1h30m, etc)
-t, --run-time TIME Stops load test after (30s, 20m, 3h, 1h30m, etc)
-G, --goose-log NAME Enables Goose log file and sets name
-g, --log-level Increases Goose log level (-g, -gg, etc)
-q, --quiet Decreases Goose verbosity (-q, -qq, etc)
-v, --verbose Increases Goose verbosity (-v, -vv, etc)
Metrics:
--running-metrics TIME How often to optionally print running metrics
--no-reset-metrics Doesn't reset metrics after all users have started
--no-metrics Doesn't track metrics
--no-transaction-metrics Doesn't track transaction metrics
--no-print-metrics Doesn't display metrics at end of load test
--no-error-summary Doesn't display an error summary
--report-file NAME Create an html-formatted report
--no-granular-report Disable granular graphs in report file
-R, --request-log NAME Sets request log file name
--request-format FORMAT Sets request log format (csv, json, raw, pretty)
--request-body Include the request body in the request log
-T, --transaction-log NAME Sets transaction log file name
--transaction-format FORMAT Sets log format (csv, json, raw, pretty)
-E, --error-log NAME Sets error log file name
--error-format FORMAT Sets error log format (csv, json, raw, pretty)
-D, --debug-log NAME Sets debug log file name
--debug-format FORMAT Sets debug log format (csv, json, raw, pretty)
--no-debug-body Do not include the response body in the debug log
--no-status-codes Do not track status code metrics
Advanced:
--test-plan "TESTPLAN" Defines a more complex test plan ("10,60;0,30")
--no-telnet Doesn't enable telnet Controller
--telnet-host HOST Sets telnet Controller host (default: 0.0.0.0)
--telnet-port PORT Sets telnet Controller TCP port (default: 5116)
--no-websocket Doesn't enable WebSocket Controller
--websocket-host HOST Sets WebSocket Controller host (default: 0.0.0.0)
--websocket-port PORT Sets WebSocket Controller TCP port (default: 5117)
--no-autostart Doesn't automatically start load test
--no-gzip Doesn't set the gzip Accept-Encoding header
--timeout VALUE Sets per-request timeout, in seconds (default: 60)
--co-mitigation STRATEGY Sets coordinated omission mitigation strategy
--throttle-requests VALUE Sets maximum requests per second
--sticky-follow Follows base_url redirect with subsequent requests
Gaggle:
--manager Enables distributed load test Manager mode
--expect-workers VALUE Sets number of Workers to expect
--no-hash-check Tells Manager to ignore load test checksum
--manager-bind-host HOST Sets host Manager listens on (default: 0.0.0.0)
--manager-bind-port PORT Sets port Manager listens on (default: 5115)
--worker Enables distributed load test Worker mode
--manager-host HOST Sets host Worker connects to (default: 127.0.0.1)
--manager-port PORT Sets port Worker connects to (default: 5115)
Goose leverages gumdrop
to derive the above help from
the the below structure.
Fields
help: bool
Displays this help
version: bool
Prints version information
list: bool
Lists all transactions and exits
host: String
Defines host to load test (ie http://10.21.32.33)
users: Option<usize>
Sets concurrent users (default: number of CPUs)
hatch_rate: Option<String>
Sets per-second user hatch rate (default: 1)
startup_time: String
Starts users for up to (30s, 20m, 3h, 1h30m, etc)
run_time: String
Stops load test after (30s, 20m, 3h, 1h30m, etc)
goose_log: String
Enables Goose log file and sets name
log_level: u8
Increases Goose log level (-g, -gg, etc)
quiet: u8
Decreases Goose verbosity (-q, -qq, etc)
verbose: u8
Increases Goose verbosity (-v, -vv, etc)
running_metrics: Option<usize>
How often to optionally print running metrics
no_reset_metrics: bool
Doesn’t reset metrics after all users have started
no_metrics: bool
Doesn’t track metrics
no_transaction_metrics: bool
Doesn’t track transaction metrics
no_print_metrics: bool
Doesn’t display metrics at end of load test
no_error_summary: bool
Doesn’t display an error summary
report_file: String
Create an html-formatted report
no_granular_report: bool
Disable granular graphs in report file
request_log: String
Sets request log file name
request_format: Option<GooseLogFormat>
Sets request log format (csv, json, raw, pretty)
request_body: bool
Include the request body in the request log
transaction_log: String
Sets transaction log file name
transaction_format: Option<GooseLogFormat>
Sets log format (csv, json, raw, pretty)
error_log: String
Sets error log file name
error_format: Option<GooseLogFormat>
Sets error log format (csv, json, raw, pretty)
debug_log: String
Sets debug log file name
debug_format: Option<GooseLogFormat>
Sets debug log format (csv, json, raw, pretty)
no_debug_body: bool
Do not include the response body in the debug log
no_status_codes: bool
Do not track status code metrics
no_telnet: bool
Doesn’t enable telnet Controller
telnet_host: String
Sets telnet Controller host (default: 0.0.0.0)
telnet_port: u16
Sets telnet Controller TCP port (default: 5116)
no_websocket: bool
Doesn’t enable WebSocket Controller
websocket_host: String
Sets WebSocket Controller host (default: 0.0.0.0)
websocket_port: u16
Sets WebSocket Controller TCP port (default: 5117)
no_autostart: bool
Doesn’t automatically start load test
no_gzip: bool
Doesn’t set the gzip Accept-Encoding header
timeout: Option<String>
Sets per-request timeout, in seconds (default: 60)
co_mitigation: Option<GooseCoordinatedOmissionMitigation>
Sets coordinated omission mitigation strategy
throttle_requests: usize
Sets maximum requests per second
sticky_follow: bool
Follows base_url redirect with subsequent requests
manager: bool
Enables distributed load test Manager mode
expect_workers: Option<usize>
Sets number of Workers to expect
no_hash_check: bool
Tells Manager to ignore load test checksum
manager_bind_host: String
Sets host Manager listens on (default: 0.0.0.0)
manager_bind_port: u16
Sets port Manager listens on (default: 5115)
worker: bool
Enables distributed load test Worker mode
manager_host: String
Sets host Worker connects to (default: 127.0.0.1)
manager_port: u16
Sets port Worker connects to (default: 5115)
Trait Implementations
sourceimpl Clone for GooseConfiguration
impl Clone for GooseConfiguration
sourcefn clone(&self) -> GooseConfiguration
fn clone(&self) -> GooseConfiguration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GooseConfiguration
impl Debug for GooseConfiguration
sourceimpl<'de> Deserialize<'de> for GooseConfiguration
impl<'de> Deserialize<'de> for GooseConfiguration
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Options for GooseConfiguration
impl Options for GooseConfiguration
sourcefn parse<__S: AsRef<str>>(_parser: &mut Parser<'_, __S>) -> Result<Self, Error>
fn parse<__S: AsRef<str>>(_parser: &mut Parser<'_, __S>) -> Result<Self, Error>
Parses arguments until the given parser is exhausted or until an error is encountered. Read more
sourcefn command(&self) -> Option<&dyn Options>
fn command(&self) -> Option<&dyn Options>
Returns the subcommand instance, if present. Read more
sourcefn command_name(&self) -> Option<&'static str>
fn command_name(&self) -> Option<&'static str>
Returns the name of a parsed command, if present. Read more
sourcefn help_requested(&self) -> bool
fn help_requested(&self) -> bool
Returns whether the user supplied a “help” option to request usage information about the program or any contained subcommands. Read more
sourcefn parse_command<__S: AsRef<str>>(
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
fn parse_command<__S: AsRef<str>>(
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
Parses options for the named command.
sourcefn usage() -> &'static str
fn usage() -> &'static str
Returns a string showing usage and help for each supported option. Read more
sourcefn self_usage(&self) -> &'static str
fn self_usage(&self) -> &'static str
Returns a string showing usage and help for this options instance. Read more
sourcefn command_list() -> Option<&'static str>
fn command_list() -> Option<&'static str>
Returns a string listing available commands and help text. Read more
sourcefn command_usage(_name: &str) -> Option<&'static str>
fn command_usage(_name: &str) -> Option<&'static str>
Returns a usage string for the named command. Read more
sourcefn self_command_list(&self) -> Option<&'static str>
fn self_command_list(&self) -> Option<&'static str>
Returns a listing of available commands and help text. Read more
sourcefn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
S: AsRef<str>,
fn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
S: AsRef<str>,
Parses arguments received from the command line. Read more
sourcefn parse_args_or_exit(style: ParsingStyle) -> Self
fn parse_args_or_exit(style: ParsingStyle) -> Self
Parses arguments from the environment. Read more
sourcefn parse_args_default_or_exit() -> Self
fn parse_args_default_or_exit() -> Self
Parses arguments from the environment, using the default parsing style. Read more
sourceimpl Serialize for GooseConfiguration
impl Serialize for GooseConfiguration
Auto Trait Implementations
impl RefUnwindSafe for GooseConfiguration
impl Send for GooseConfiguration
impl Sync for GooseConfiguration
impl Unpin for GooseConfiguration
impl UnwindSafe for GooseConfiguration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
sourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<T> DowncastSync for T where
T: Any + Send + Sync,
impl<T> DowncastSync for T where
T: Any + Send + Sync,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more