Skip to main content

Crate goose

Crate goose 

Source
Expand description

§Goose

Have you ever been attacked by a goose?

Goose is a load testing framework inspired by Locust. User behavior is defined with standard Rust code.

Goose load tests, called Goose Attacks, are built by creating an application with Cargo, and declaring a dependency on the Goose library.

Goose uses reqwest to provide a convenient HTTP client.

§Documentation

§License

Copyright 2020-2023 Jeremy Andrews

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Modules§

client
Type-Safe HTTP Client Builder for Goose Load Tests
config
Functions and structures related to configuring a Goose load test.
controller
Optional telnet and WebSocket Controller threads.
goose
Helpers and objects for building Goose load tests.
logger
An optional thread for writing logs.
metrics
Optional metrics collected and aggregated during load tests.
prelude
A list of things that typically must be imported to write a Goose load test.
test_plan
Test plan structures and functions.
threshold
Pass/fail rules on a load test’s metrics.
util
Utility functions used by Goose, and available when writing load tests.

Macros§

scenario
scenario!("foo") expands to Scenario::new("foo").
transaction
transaction!(foo) expands to Transaction::new(foo), but also does some boxing to work around a limitation in the compiler.

Structs§

GooseAttack
Global internal state for the load test.
ThresholdMetrics
The metrics of a run that failed a threshold, held by GooseError::ThresholdsFailed. It reads as the GooseMetrics it holds, as in metrics.duration, and its Debug leaves them out: a main that returns the error prints it, and the metrics of a whole run would bury the rules that failed.

Enums§

AttackMode
A GooseAttack load test operates in one (and only one) of the following modes.
AttackPhase
A GooseAttack load test moves through each of the following phases during a complete load test.
GooseError
An enumeration of all errors a GooseAttack can return.
GooseScheduler
Used to define the order Scenarios and Transactions are allocated.

Functions§

is_killswitch_triggered
Check if the killswitch has been triggered.
reset_killswitch
Clear the killswitch.
trigger_killswitch
Trigger the killswitch to stop the load test run.