fn build_swanling_attack(
    test_type: &TestType,
    configuration: SwanlingConfiguration,
) -> SwanlingAttack {
    let taskset = taskset!("LoadTest").register_task(task!(get_index).set_weight(9).unwrap());
    let start_task = task!(setup);
    let stop_task = task!(teardown);
    match test_type {
        TestType::Start => {
            common::build_load_test(configuration, &taskset, Some(&start_task), None)
        }
        TestType::Stop => common::build_load_test(configuration, &taskset, None, Some(&stop_task)),
        TestType::StartAndStop => {
            common::build_load_test(configuration, &taskset, Some(&start_task), Some(&stop_task))
        }
    }
}
// Build an appropriate SwanlingAttack object for test type, using supplied configuration.
Build an appropriate SwanlingAttack object for test type, using supplied configuration.
Build an appropriate SwanlingAttack object for test type using supplied configuration .
fn build_swanling_attack(
    test_type: &TestType,
    configuration: SwanlingConfiguration,
) -> SwanlingAttack {
    let taskset = taskset!("LoadTest").register_task(task!(get_index).set_weight(9).unwrap());
    let start_task = task!(setup);
    let stop_task = task!(teardown);
    match test_type {
        TestType::Start => {
            common::build_load_test(configuration, &taskset, Some(&start_task), None)
        }
        TestType::Stop => common::build_load_test(configuration, &taskset, None, Some(&stop_task)),
        TestType::StartAndStop => {
            common::build_load_test(configuration, &taskset, Some(&start_task), Some(&stop_task))
        }
    }
}
fn build_swanling_attack ( test_type : & TestType , configuration : SwanlingConfiguration , ) -> SwanlingAttack { let taskset = taskset ! ( " " ) . register_task ( task ! ( get_index ) . set_weight ( 9 ) . unwrap ( ) ) ; let start_task = task ! ( setup ) ; let stop_task = task ! ( teardown ) ; match test_type { TestType :: Start => { common :: build_load_test ( configuration , & taskset , Some ( & start_task ) , None ) } TestType :: Stop => common :: build_load_test ( configuration , & taskset , None , Some ( & stop_task ) ) , TestType :: StartAndStop => { common :: build_load_test ( configuration , & taskset , Some ( & start_task ) , Some ( & stop_task ) ) } } }
Build an appropriate SwanlingAttack object for test type, using supplied configuration.
Build an appropriate SwanlingAttack object for test type using supplied configuration .
test_type
&TestType
configuration
SwanlingConfiguration