Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix calls to py_new(...) with changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Jan 30, 2023
1 parent 916cba5 commit 60f2c3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rust/benches/evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#![feature(test)]
use std::collections::BTreeSet;
use synapse::push::{
evaluator::PushRuleEvaluator, Condition, EventMatchCondition, FilteredPushRules, PushRules,
};
Expand All @@ -33,6 +34,7 @@ fn bench_match_exact(b: &mut Bencher) {
let eval = PushRuleEvaluator::py_new(
flattened_keys,
BTreeSet::new(),
false,
10,
Some(0),
Default::default(),
Expand Down Expand Up @@ -69,6 +71,8 @@ fn bench_match_word(b: &mut Bencher) {

let eval = PushRuleEvaluator::py_new(
flattened_keys,
BTreeSet::new(),
false,
10,
Some(0),
Default::default(),
Expand Down Expand Up @@ -105,6 +109,8 @@ fn bench_match_word_miss(b: &mut Bencher) {

let eval = PushRuleEvaluator::py_new(
flattened_keys,
BTreeSet::new(),
false,
10,
Some(0),
Default::default(),
Expand Down Expand Up @@ -141,6 +147,8 @@ fn bench_eval_message(b: &mut Bencher) {

let eval = PushRuleEvaluator::py_new(
flattened_keys,
BTreeSet::new(),
false,
10,
Some(0),
Default::default(),
Expand All @@ -157,6 +165,7 @@ fn bench_eval_message(b: &mut Bencher) {
false,
false,
false,
false,
);

b.iter(|| eval.run(&rules, Some("bob"), Some("person")));
Expand Down

0 comments on commit 60f2c3e

Please sign in to comment.