pub fn setup_complete<T: Serialize + ?Sized>(details: &T)Expand description
Indicates to Antithesis that setup has completed. Call this function when your system and workload are fully initialized. After this function is called, Antithesis will take a snapshot of your system and begin injecting faults.
Calling this function multiple times or from multiple processes will have no effect. Antithesis will treat the first time any process called this function as the moment that the setup was completed.
Details may be any borrowed value implementing Serialize. Objects are
preserved; other non-null JSON values are wrapped under "value", for
example 3 becomes {"value": 3}. Pass &() or &Value::Null for no
details; an explicit empty object is preserved. Serialization errors emit an
antithesis_error message and omit details; the setup event is still
emitted. With the full feature disabled, details are not serialized.
ยงExample
use serde_json::{json, Value};
use antithesis_sdk::lifecycle;
let (num_nodes, main_id) = (10, "n-001");
let startup_data: Value = json!({
"num_nodes": num_nodes,
"main_node_id": main_id,
});
lifecycle::setup_complete(&startup_data);