pub fn trigger_killswitch(reason: &str)Expand description
Trigger the killswitch to stop the load test run.
This function records the reason and marks the killswitch as triggered, which will cause the test to stop gracefully at the next check point. Only the first reason is kept; later calls change nothing until the killswitch is reset when the next load test starts.
§Arguments
reason- A string describing why the test is being stopped
§Example
use goose::trigger_killswitch;
// Stop the test due to high error rate
trigger_killswitch("Error rate exceeded 50% threshold");