use super::*; from_examples!(DMN_3_0033); #[bench] fn _0001(b: &mut Bencher) { let ctx = context(r#"{heights: [10, 20, 30]}"#); let invocable_name = "increase1"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[11, 21, 31]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0002(b: &mut Bencher) { let ctx = context(r#"{heights: [10, 20, 30], widths: [2, 3]}"#); let invocable_name = "areas"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[20, 30, 40, 60, 60, 90]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0003(b: &mut Bencher) { let ctx = context(r#"{factors: [2, 3, 5, 7, 11], value: 35}"#); let invocable_name = "check factors"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[false, false, true, true, false]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0004(b: &mut Bencher) { let ctx = context(r#"{value: 10}"#); let invocable_name = "multiples"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"[20, 30, 40, 50]"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); }