use super::*; from_examples!(DMN_3_0020); #[bench] fn _0001(b: &mut Bencher) { let ctx = context(r#"{Age: 16,Years of Service: 1}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"27"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0002(b: &mut Bencher) { let ctx = context(r#"{Age: 25,Years of Service: 5}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"22"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0003(b: &mut Bencher) { let ctx = context(r#"{Age: 25,Years of Service: 20}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"24"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0004(b: &mut Bencher) { let ctx = context(r#"{Age: 44,Years of Service: 30}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"30"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0005(b: &mut Bencher) { let ctx = context(r#"{Age: 50,Years of Service: 20}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"24"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0006(b: &mut Bencher) { let ctx = context(r#"{Age: 50,Years of Service: 30}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"30"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); } #[bench] fn _0007(b: &mut Bencher) { let ctx = context(r#"{Age: 60,Years of Service: 20}"#); let invocable_name = "Total Vacation Days"; assert_decision(&MODEL_EVALUATOR, &MODEL_NAMESPACE, invocable_name, &ctx, r#"30"#); b.iter(|| MODEL_EVALUATOR.evaluate_invocable(&MODEL_NAMESPACE, invocable_name, &ctx)); }