From cf2863ae1528964ad2cc81e8ff515aceea000b3a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 14 Jul 2026 14:07:25 +0100 Subject: [PATCH] Fix the evaluator benchmarks for the knock push rule signatures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PushRuleEvaluator::py_new gained action_power_levels, and match_condition/run gained recipient_power_level, for the MSC4506 recipient_permission condition — update the benchmark call sites. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Uk8aPxHn3BHCe52L226jdG --- rust/benches/evaluator.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/rust/benches/evaluator.rs b/rust/benches/evaluator.rs index e59a6d2f6a..0d09c0c9e9 100644 --- a/rust/benches/evaluator.rs +++ b/rust/benches/evaluator.rs @@ -57,6 +57,7 @@ fn bench_match_exact(b: &mut Bencher) { Some(0), Default::default(), Default::default(), + Default::default(), true, vec![], false, @@ -72,10 +73,10 @@ fn bench_match_exact(b: &mut Bencher) { }, )); - let matched = eval.match_condition(&condition, None, None, None).unwrap(); + let matched = eval.match_condition(&condition, None, None, None, None).unwrap(); assert!(matched, "Didn't match"); - b.iter(|| eval.match_condition(&condition, None, None, None).unwrap()); + b.iter(|| eval.match_condition(&condition, None, None, None, None).unwrap()); } #[bench] @@ -104,6 +105,7 @@ fn bench_match_word(b: &mut Bencher) { Some(0), Default::default(), Default::default(), + Default::default(), true, vec![], false, @@ -119,10 +121,10 @@ fn bench_match_word(b: &mut Bencher) { }, )); - let matched = eval.match_condition(&condition, None, None, None).unwrap(); + let matched = eval.match_condition(&condition, None, None, None, None).unwrap(); assert!(matched, "Didn't match"); - b.iter(|| eval.match_condition(&condition, None, None, None).unwrap()); + b.iter(|| eval.match_condition(&condition, None, None, None, None).unwrap()); } #[bench] @@ -151,6 +153,7 @@ fn bench_match_word_miss(b: &mut Bencher) { Some(0), Default::default(), Default::default(), + Default::default(), true, vec![], false, @@ -166,10 +169,10 @@ fn bench_match_word_miss(b: &mut Bencher) { }, )); - let matched = eval.match_condition(&condition, None, None, None).unwrap(); + let matched = eval.match_condition(&condition, None, None, None, None).unwrap(); assert!(!matched, "Didn't match"); - b.iter(|| eval.match_condition(&condition, None, None, None).unwrap()); + b.iter(|| eval.match_condition(&condition, None, None, None, None).unwrap()); } #[bench] @@ -198,6 +201,7 @@ fn bench_eval_message(b: &mut Bencher) { Some(0), Default::default(), Default::default(), + Default::default(), true, vec![], false, @@ -216,7 +220,8 @@ fn bench_eval_message(b: &mut Bencher) { false, false, false, + false, ); - b.iter(|| eval.run(&rules, Some("bob"), Some("person"), None)); + b.iter(|| eval.run(&rules, Some("bob"), Some("person"), None, None)); }