Load testing framework, inspired by Locust
GooseRequest
and GooseRequestBuilder
for more flexibility when making requests
o remove GooseUser::post_named
, GooseUser::head_named
, GooseUser::delete_named
, GooseUser::goose_get
, GooseUser::goose_put
, GooseUser::goose_head
, GooseUser::goose_put
, GooseUser::goose_patch
, GooseUser::goose_delete
, and GooseUser::goose_send
o adds or modifies helpers GooseUser::get
, GooseUser::get_named
, GooseUser::post
, GooseUser::post_form
, GooseUser::post_json
, GooseUser::head
, and GooseUser::delete
o replaces GooseUser::goose_send
with GooseUser::request
which accepts a GooseRequest
object
o fixes [#370] (see GooseRequestBuilder::expect_status_code
)README.md
(and enhance) into The Goose Book
GooseAttack.execute
async, main()
function signature changed to:
#[tokio::main]
fn main() -> Result<(), GooseError> {
GooseUserData
to each GooseUser
GooseTask
signature to take a mutable reference of GooseUser
:
async fn example_task_function(user: &mut GooseUser) -> GooseTaskResult {
GooseTaskSet::set_wait_time()
to accept std::time::Duration
instead of usize
allowing more granularityClone
trait from GooseUser
and GooseAttack
tungstenite
dependency to 0.15
--no-task-metrics
is enabled and metrics are printed; add tests to prevent further regressions--startup-time
which can be set together with --users
instead of using --hatch-rate
to configure how quickly to start users--run-time
to always start counting after all users are fully startedbase_url
can include a path and be joined with a relative pathpretty
log format for --error-format
, --debug-format
, --request-format
, and --task-format
0.6
gzip
support and set Accept-Encoding header by default in the client; disable with --no-gzip
or GooseDefault::NoGzip
rustc_version
dependency to 0.4
GooseRequestMetric
so they show up in the request log and the debug logGooseRawMetric
which contains the method
, url
, headers
and body
of the client request made, and is now contained in raw
field of the GooseRequestMetric
(API change)--request-body
(and GooseDefault::RequestBody
) which when enabled shows up in the body
field of the GooseRawMetric
GooseRawMetric
to the request log, debug log and error logrustls
feature to rustls-tls
so tests/controller.rs
can build with the rustls
library; update tungstenite
to 0.14
and tokio-tungstenite
= 0.15
to allow building with rustls
GooseDefault::RequestFormat
and fix linksGooseConfiguration.manager
and GooseConfiguration.worker
; confirm Manager is enabled when setting --expect-workers
GooseConfiguration
, GooseDefault
, and GooseDefaultType
into new src/config.rs
file; standardized configuration precedence through internal GooseConfigure
trait defining get_value()
for all supported types; general improvements to configuration documentationgoose::initialize_logger()
, Socket
reduced to pub(crate)
scope
o goose::controller::GooseControllerProtocol
, GooseControllerRequestMessage
, GooseControllerResponseMessage
, GooseControllerRequest
, GooseControllerResponse
, GooseControllerState
, ::controller_main()
reduced to pub(crate)
scope
o goose::manager::manager_main()
reduced to pub(crate)
scope
o goose::metrics::GooseRequestMetric::new()
, ::set_final_url()
, ::set_response_time()
, and ::set_status_code()
, ::per_second_calculations()
, format_number()
, merge_times()
, update_min_time()
, update_max_time()
, calculate_response_time_percentile()
, and prepare_status_codes()
reduced to pub(crate)
scope
o goose::metrics::GooseRequestMetricAggregate::new()
, ::set_response_time()
, and ::set_status_code()
reduced to pub(crate)
scope
o goose::metrics::GooseTaskMetric::new()
and ::set_time()
reduced to pub(crate)
scope
o goose::metrics::GooseMetrics::initialize_task_metrics()
and ::print_running()
, ::fmt_requests()
, ::fmt_tasks()
, ::fmt_task_times()
, ::fmt_response_times()
, ::fmt_percentiles()
, ::fmt_status_codes()
and ::fmt_errors()
reduced to pub(crate)
scope
o from goose::metrics::GooseMetrics
reduced final_metrics
, display_status_codes
and display_metrics
fields to pub(crate)
scope
o goose::metrics::GooseErrorMetric::new()
reduced to pub(crate)
scope
o goose::logger::logger_main()
reduced to pub(crate)
scope
o goose::user::user_main()
reduced to pub(crate)
scope
o goose::worker::worker_main()
reduced to pub(crate)
scopemetrics.rs
, rename for consistency, and improve documentation (API change)
o goose::GooseRawRequest
changed to goose::metrics::GooseRequestMetric
o goose::GooseRequest
changed to goose::metrics::GooseRequestMetricAggregate
o goose::GooseRawTask
changed to goose::metrics::GooseTaskMetric
o goose::GooseRawTask
changed to goose::metrics::GooseTaskMetricAggregate
o goose::update_duration()
changed to goose::metrics::update_duration()
and reduced to pub(crate)
scope
o goose::sync_metrics()
changed to goose::metrics::sync_metrics()
and reduced to pub(crate)
scope
o goose::reset_metrics()
changed to goose::metrics::reset_metrics()
and reduced to pub(crate)
scope
o goose::receive_metrics()
changed to goose::metrics::receive_metrics()
and reduced to pub(crate)
scope
o goose::record_error()
changed to goose::metrics::record_error()
and reduced to pub(crate)
scopegoose::util::parse_timespan()
, ::gcd()
, ::median()
, ::truncate_string()
, ::timer_expired()
, ::ms_timer_expired()
, ::get_hatch_rate()
, and ::is_valid_host()
were elevated to pub
scope--co-mitigation
with the following options: "disabled" (default0), "average", "minimum", "maximum"; (or with GooseDefault::CoordinatedOmissionMitigation
).set_wait_time()
); it detects stalls (network or upstream server) that block and prevent other requests from running, and backfills the metrics to mitigate this loss of data (based on the general implementation found in HdrHistogram
GooseLog
enum for sending GooseDebug
, GooseRequestMetric
and GooseTaskMetric
objects to the Logger thread for logging to file--tasks-file
run-time option for logging GooseTaskMetric
s to fileGooseTaskMetric
to GooseTaskMetricAggregate
, and introduce GooseTaskMetric
which is a subset of GooseRequestMetric
only used for logging--error-file
run-time option for logging GooseErrorMetric
s to fileGooseLogFormat
enum for formatting all logs; add --task-format
and --error-format
using new enum, update --requests-format
and --debug-format
.--log-file
to --goose-log
, --requests-file
to --request-log
, --requests-format
to --request-format
, --tasks-file
to --task-log
, --tasks-format
to --task-format
, --error-file
to --error-log
, and --debug-file
to --debug-log
--no-telnet
, supports the following commands:
o help
(and ?
) display help
o exit
(and quit
) exit the telnet Controller
o shutdown
shuts down the running load test (and exits the controller)
o host
(and hosts
) HOST sets host to load test against, ie http://localhost/
o users
(and user
) INT sets number of simulated users
o hatchrate
(and hatch_rate
) FLOAT sets per-second rate users hatch
o runtime
(and run_time
) TIME sets how long the load test should run
o config
displays the current load test configuration
o config-json
displays the current load test configuration in json format
o metrics
(and stats
) displays metrics for the current load test
o metrics-json
(and stats-json
) displays metrics for the current load test in json format0.0.0.0
, can be configured with --telnet-host
5116
, can be configured with --telnet-port
GooseDefault::NoTelnet
(bool)
o default host to bind telnet Controller to: GooseDefault::TelnetHost
(&str)
o default port to bind telnet Controller to: GooseDefault::TelnetPort
(usize)--no-websocket
, supports the same commands as the telnet Controller, except:
o config
and config-json
both return the load test configuration in json format
o metrics
and metrics-json
both return metrics for the current load test in json format0.0.0.0
, can be configured with --websocket-host
5117
, can be configured with --websocket-port
GooseDefault::NoWebSocket
(bool)
o default host to bind WebSocket Controller to: GooseDefault::WebSocketHost
(&str)
o default port to bind WebSocket Controller to: GooseDefault::WebSocketPort
(usize)--no-autostart
to disable automatically starting the load test, leaves Goose in an idle state waiting for Controller commands (optionally change the default with GooseDefault::NoAutoStart
)
o renamed stop
Controller command to shutdown
o added new start
Controller command, telling idle Goose load test to start
o added new stop
Controller command, telling running Goose load test to stop and return to idle stateasync_trait
dependency as stable Rust doesn't otherwise support async traits--no-autostart
is enabled, requiring instead that the host be configured via a Controller before starting a load test