- rename
rustls
feature torustls-tls
sotests/controller.rs
can build with therustls
library; updatetungstenite
to0.14
andtokio-tungstenite
=0.15
to allow building withrustls
- documentation cleanup; properly rename
GooseDefault::RequestFormat
and fix links - always configure
GooseConfiguration.manager
andGooseConfiguration.worker
; confirm Manager is enabled when setting--expect-workers
- remove internal-only functions and structures from documentation, exposing only what's useful to consumers of the Goose library (API change)
o
goose::initialize_logger()
,Socket
reduced topub(crate)
scope ogoose::controller::GooseControllerProtocol
,GooseControllerRequestMessage
,GooseControllerResponseMessage
,GooseControllerRequest
,GooseControllerResponse
,GooseControllerState
,::controller_main()
reduced topub(crate)
scope ogoose::manager::manager_main()
reduced topub(crate)
scope ogoose::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()
, andprepare_status_codes()
reduced topub(crate)
scope ogoose::metrics::GooseRequestMetricAggregate::new()
,::set_response_time()
, and::set_status_code()
reduced topub(crate)
scope ogoose::metrics::GooseTaskMetric::new()
and::set_time()
reduced topub(crate)
scope ogoose::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 topub(crate)
scope o fromgoose::metrics::GooseMetrics
reducedfinal_metrics
,display_status_codes
anddisplay_metrics
fields topub(crate)
scope ogoose::metrics::GooseErrorMetric::new()
reduced topub(crate)
scope ogoose::logger::logger_main()
reduced topub(crate)
scope ogoose::user::user_main()
reduced topub(crate)
scope ogoose::worker::worker_main()
reduced topub(crate)
scope - move all metrics-related stuctures and methods into
metrics.rs
, rename for consistency, and improve documentation (API change) ogoose::GooseRawRequest
changed togoose::metrics::GooseRequestMetric
ogoose::GooseRequest
changed togoose::metrics::GooseRequestMetricAggregate
ogoose::GooseRawTask
changed togoose::metrics::GooseTaskMetric
ogoose::GooseRawTask
changed togoose::metrics::GooseTaskMetricAggregate
ogoose::update_duration()
changed togoose::metrics::update_duration()
and reduced topub(crate)
scope ogoose::sync_metrics()
changed togoose::metrics::sync_metrics()
and reduced topub(crate)
scope ogoose::reset_metrics()
changed togoose::metrics::reset_metrics()
and reduced topub(crate)
scope ogoose::receive_metrics()
changed togoose::metrics::receive_metrics()
and reduced topub(crate)
scope ogoose::record_error()
changed togoose::metrics::record_error()
and reduced topub(crate)
scope - expose utility functions used by Goose for use by load tests
o
goose::util::parse_timespan()
,::gcd()
,::median()
,::truncate_string()
,::timer_expired()
,::ms_timer_expired()
,::get_hatch_rate()
, and::is_valid_host()
were elevated topub
scope - introduce (disabled by default) Coordinated Omission Mitigation, configured through
--co-mitigation
with the following options: "disabled" (default0), "average", "minimum", "maximum"; (or withGooseDefault::CoordinatedOmissionMitigation
) - (EXPERIMENTAL) Coordinated Omission Mitigation tracks the cadence that a GooseUser loops through all GooseTasks, (also accounting for time spent sleeping due to
.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 - When displaying metrics (via the cli and the html report) show both "raw" (actual) metrics and "coordinated omission mitigation" (back-filled with statistically generated) metrics, and the standard deviation between the average times for each
- introduce
GooseLog
enum for sendingGooseDebug
,GooseRequestMetric
andGooseTaskMetric
objects to the Logger thread for logging to file - introduce
--tasks-file
run-time option for loggingGooseTaskMetric
s to file - rename
GooseTaskMetric
toGooseTaskMetricAggregate
, and introduceGooseTaskMetric
which is a subset ofGooseRequestMetric
only used for logging - introduce
--error-file
run-time option for loggingGooseErrorMetric
s to file - introduce
GooseLogFormat
enum for formatting all logs; add--task-format
and--error-format
using new enum, update--requests-format
and--debug-format
. - renamed
--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
- introduce telnet Controller allowing real-time control of load test, optionally disable with
--no-telnet
, supports the following commands: ohelp
(and?
) display help oexit
(andquit
) exit the telnet Controller oshutdown
shuts down the running load test (and exits the controller) ohost
(andhosts
) HOST sets host to load test against, ie http://localhost/ ousers
(anduser
) INT sets number of simulated users ohatchrate
(andhatch_rate
) FLOAT sets per-second rate users hatch oruntime
(andrun_time
) TIME sets how long the load test should run oconfig
displays the current load test configuration oconfig-json
displays the current load test configuration in json format ometrics
(andstats
) displays metrics for the current load test ometrics-json
(andstats-json
) displays metrics for the current load test in json format - telnet Controller bind host defaults to
0.0.0.0
, can be configured with--telnet-host
- telnet Controller bind port defaults to
5116
, can be configured with--telnet-port
- telnet Controller defaults can be changed:
o default to not enabling telnet Controller:
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) - introduce WebSocket Controller allowing real-time control of load test, optionally disable with
--no-websocket
, supports the same commands as the telnet Controller, except: oconfig
andconfig-json
both return the load test configuration in json format ometrics
andmetrics-json
both return metrics for the current load test in json format - WebSocket Controller bind host defaults to
0.0.0.0
, can be configured with--websocket-host
- WebSocket Controller bind port defaults to
5117
, can be configured with--websocket-port
- WebSocket Controller defaults can be changed:
o default to not enabling WebSocket Controller:
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) - make it possible to start and stop a load test without completely restarting Goose
- introduce
--no-autostart
to disable automatically starting the load test, leaves Goose in an idle state waiting for Controller commands (optionally change the default withGooseDefault::NoAutoStart
) o renamedstop
Controller command toshutdown
o added newstart
Controller command, telling idle Goose load test to start o added newstop
Controller command, telling running Goose load test to stop and return to idle state - code cleanup and logic consollidation to support Controller fixed a bug where metrics wouldn't display and the debug file, request file, and html report weren't written when load test was stopped while still launching users
- regularly sync metrics, using a timeout to avoid hanging the main loop
- properly reset metrics when load test is stopped and restarted
- properly flush debug file, request file, and html report when stopping load test with Controller
- properly (re)create debug file, request file, and html report when starting load test with Controller
- if metrics are enabled, display when controller stops load test
- de-duplicate code with traits, gaining compile-time validation that both Controllers are properly handling all defined commands
- add
async_trait
dependency as stable Rust doesn't otherwise support async traits - allow starting Goose without specifying a host if
--no-autostart
is enabled, requiring instead that the host be configured via a Controller before starting a load test - add test for telnet and WebSocket Controllers
- update
rand
dependency to0.8
branch, updategen_range
method call - update dependencies:
itertools
to0.10
,simplelog
to0.10
,url
to2
- update
nng
dependency for optionalgaggle
feature - simplify
examples/umami
regex when parsing form - allow configuration of algorithm for allocating
GooseTask
s the same asGooseTaskSet
s;GooseTaskSetScheduler
becomes more genericallyGooseScheduler
- specify (and detect) minimum
rustc
requirement of1.49.0
, due toflume
dependency which in turn depends onspinning_top
which useshint::spin_loop
which stabilized inrustc
version `1.49.0 - standardize links in documentation; general documentation cleanups
- capture errors and count frequency for each, including summary in metrics report; optionally disable with
--no-error-summary
- clippy cleanups (prepare for Rust 2021 https://blog.rust-lang.org/inside-rust/2021/03/04/planning-rust-2021.html):
o API change: all
GooseMethod
s renamed to enforce Rust naming conventions in regards to case, for exampleGooseMethod::GET
becomesGooseMethod::Get
o usevec![]
macro to avoid unnecessarily pushing data into mutable vectors o callformat!
macro directly for improved readability o remove unnecessarypanic!
- avoid unnecessary work on Manager when starting a Gaggle
- respect
--hatch-rate
when starting a Gaggle - update httpmock for running tests
- remove unnecessary
Result()
types where no error was possible
- introduce
--report-file
(andGooseDefault::ReportFile
) to optionally generate an HTML report when the load test completes - upgrade to
tokio
1.x, and switch toflume
for all multi-producer, multi-consumer channels - make
examples/umami
more generic for easier load testing of any Drupal 9 version of the demo install profile
- account for time spent doing things other than sleeping, maintaining more consistency when displaying statistics and shutting down
- start each debug log file with a line feed in case the page is too big for the buffer; increase the debug logger buffer size from 8K to 8M
- introduce
--no-debug-body
flag to optionally prevent debug log from including the response body - rename the metrics file to requests file to better reflect what it is
o
--metrics-file
becomes--requests-file
o--metrics-format
becomes--requests-format
oGooseDebug::MetricsFile
becomesGooseDebug::RequestsFile
oGooseDebug::MetricsFormat
becomesGooseDebug::RequestsFormat
- reset drift timer any time the attack_phase changes
- document all public high level files and functions
- replace
--only-summary
with--running-metrics <usize>
, running metrics are disabled by default - allow configuration of the algorithm used when allocating
GooseTaskSet
s to startingGooseUser
s: oGooseTaskSetScheduler::RoundRobin
allocates 1 of each availableGooseTaskSet
at a time (new default) oGooseTaskSetScheduler::Serial
allocates all of each availableGooseTaskSet
in the order they are defined oGooseTaskSetScheduler::Random
allocates 1 randomGooseTaskSet
from all available - when enabled, display running metrics for the entire duration of test, including ramp-up and shutdown
- support floating point hatch rate (ie, hatch 1 user every 2 seconds with
-r .5
)
- add new
examples/umami
for load testing Drupal 9 demo install profile - replace TermLogger with SimpleLogger for increased logging flexibility
- add initial OCI Dockerfile for container-based workflows
- use checked subtraction when calculating drift duration to prevent panic
- update
nng-rs
dependency to fix bug when testing that the manager is ready
- fixup sticky redirect tests to properly test functionality
- add
test/sequence.rs
to confirm sequencing tests works correctly, even in Gaggle mode - deduplicate test logic by moving shared functionality into
tests/common.rs
; consistently test functionality both in standalone and Gaggle mode - properly create debug log when enabled in Gaggle mode
- remove unnecessary
GooseAttack.number_of_cpus
instead callingnum_cpus::get()
directly - remove
tests/gaggle.rs
, instead mixing gaggle tests with per-feature integration tests - ensure
test_start
andtest_stop
run one and only one time even in Gaggle mode
- rework
hatch_rate
to be stored in anOption<usize>
as it can beNone
on a Worker - remove redundant
GooseAttack.users
instead using theOption<usize>
inconfiguration
- improve bounds handling of defaults, generate errors for invalid values
- properly handle early shutdown of Gaggle distributed load test from Worker process
- Manager starts timing Gaggle distributed load test only after all Workers start
- default to resetting statistics, disable with
--no-reset-stats
, display spawning statistics before resetting - only run gaggle integration tests when feature is enabled
- prevent time-drift when launching users and throttling requests
- add per-task statistics in addition to per-request statistics, disable with
--no-task-stats
- rename
stats
andstatistics
tometrics
for consistency and clarity o--no-stats
became--no-metrics
o--no-reset-stats
became--no-reset-metrics
o--no-task-stats
became--no-task-metrics
o--stats-log-file
became--metrics-log-file
o--stats-log-format
became--metrics-log-format
- shorten some configuration options to fit standard console width, preparation for switch to gumdrop
o
--debug-log-file
became--debug-file
o--debug-log-format
became--debug-format
o--metrics-log-file
became--metrics-file
o--metrics-log-format
became--metrics-format
- reworded errors for consistency, made error.detail required
- replace
structopt
withgumdrop
o restructured help page to logically group related options o rewrote/simplified configuration descriptions to fit standard console width - update prelude documentation
- increase precision of metrics for smaller values
- consistently build configuration from arguments
- replace
GooseAttack::set_host()
with more genericGooseAttack::set_default()
, exposes the following defaults: o default host:GooseDefault::Host
(&str) o default users to start:GooseDefault::Users
(usize) o default users to start per second:GooseDefault::HatchRate
(usize) o default number of seconds for test to run:GooseDefault::RunTime
(usize) o default log level:GooseDefault::LogLevel
(usize) o default log file name:GooseDefault::LogFile
(&str) o default verbosity:GooseDefault::Verbose
(usize) o default to only printing final summary metrics:GooseDefault::OnlySummary
(bool) o default to not resetting metrics after all users start:GooseDefault::NoResetMetrics
(bool) o default to not tracking metrics:GooseDefault::NoMetrics
(bool) o default to not tracking task metrics:GooseDefault::NoTaskMetrics
(bool) o default metrics log file name:GooseDefault::MetricsFile
(&str) o default metrics log file format:GooseDefault::MetricsFormat
(&str) o default debug log file name:GooseDefault::DebugFile
(&str) o default debug log file format:GooseDefault::DebugFormat
(&str) o default to tracking status codes:GooseDefault::StatusCodes
(bool) o default maximum requests per second:GooseDefault::ThrottleRequests
(usize) o default to following redirect of base_url:GooseDefault::StickyFollow
(bool) o default to enabling Manager mode:GooseDefault::Manager
(bool) o default number of Workers to expect:GooseDefault::ExpectWorkers
(usize) o default to ignoring load test checksum:GooseDefault::NoHashCheck
(bool) o default host to bind Manager to:GooseDefault::ManagerBindHost
(&str) o default port to bind Manager to:GooseDefault::ManagerBindPort
(usize) o default to enabling Worker mode:GooseDefault::Worker
(bool) o default host for Worker to connect to:GooseDefault::ManagerHost
(&str) o default port for Worker to connect to:GooseDefault::ManagerPort
(usize)
- return
GooseStats
fromGooseAttack
.execute()
- rework as methods of
GooseStats
:.print()
,.print_running()
,fmt_requests()
,fmt_response_times()
,fmt_percentiles()
, andfmt_status_codes()
- display
GooseStats
with fmt::Display (ieprint!("{}", goose_stats);
) - make it possible to pass a closure to GooseTask::new
- fix display of
GooseError
andGooseTaskError
- fix code documentation, requests are async and require await
- properly support setting host when registering task set
- rename
response
wrapper togoose
, so we end up withgoose.request
andgoose.response
- add
--throttle-requests
to optionally limit the maximum requests per second (api change) - introduce
GooseError
andGooseTaskError
- change task function signature, tasks must return a
GooseTaskResult
- change
GooseAttack
method signatures where an error is possible - where possible, pass error up the stack instead of calling
exit(1)
- introduce
GooseAttack.display()
which consumes the load test state and displays statistics panic!()
on unexpected errors instead ofexit(1)
client.log_debug()
will write debug logs to file when specified with--debug-log-file=
- add
-debug-log-format=
to switch betweenjson
(default) andraw
formats - cleanup code with clippy, automate clippy with PRs
- add optional compile-time
rustls
feature
- sort stats by method:name to ease comparisons
- optionally log all requests to file specified with
--stats-log-file=
- add
--stats-log-format=
to switch betweenjson
(default),csv
andraw
formats
- properly subtract previous statistic when handling
set_failure()
andset_success()
- detect and track redirects in
GooseRawRequest
--sticky-follow
makes redirect of GooseClient base_url sticky, affecting subsequent requests- changed
GooseClient
toGooseUser
- store actual URL requested in GooseRawRequest
- add
set_client_builder
, allow load test to build Reqwest clients with custom options - properly fix documentation links
- fix gaggles to not panic, add test
- fix test_start and test_stop to not panic, add tests
- optimize NNG usage, write directly to Message instead of first to buffer
- fix documentation links
- move client out of GooseClient into global GooseClientState
- introduce
test_start_task
andtest_stop_task
allowing global setup and teardown - don't panic if a load test doesn't define any normal tasks
- pass immutable GooseClient to tasks
- integrate httpmock into testing load test
- don't shuffle order of weighted task sets when launching clients
- remove GooseClientMode as it serves no useful purpose
- push statistics from client threads to parent in real-time
- simplify
set_failure
andset_success
to pass in request
- no longer compile Reqwest blocking client
- remove need to declare
use std::boxed::Box
in load tests - remove unnecessary mutexes
- introduce
use goose::prelude::*
- initial async support
- nng does not support udp as a transport protocol, and tcp overhead isn't problematic; remove to-do to add udp, hard-code tcp
- add worker id for tracing gaggle worker threads
- cleanup gaggle logic and comments
- replace
unsafe
code blocks withlazy_static
singleton - perform checksum to confirm workers are running same load test,
--no-hash-check
to ignore - code and documentation consistency
- replace
--print-stats
with--no-stats
, default to printing stats - make gaggle an optional compile-time feature
- GooseState is now GooseAttack
- Initial support for gaggles: distributed load testing