use super::*; from_examples!(DMN_2_0002); #[bench] fn _0001(b: &mut Bencher) { let ctx = context(r#"{Monthly Salary: 10000}"#); let invocable_name = "Yearly Salary"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"120000"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0002(b: &mut Bencher) { let ctx = context(r#"{Monthly Salary: 8375.00}"#); let invocable_name = "Yearly Salary"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"100500"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0003(b: &mut Bencher) { let ctx = context(r#"{Monthly Salary: 8375.13}"#); let invocable_name = "Yearly Salary"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"100501.56"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); }