Skip to content

Commit

Permalink
Fix threshold union benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorenesduarte committed Mar 18, 2019
1 parent d77d5da commit ab92282
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benches/threshold_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ mod gen {
const ELEM_COUNT: u32 = 100;
const ELEM_SIZE: u32 = 2000;

pub fn multiset() -> (MultiSet<String>, u64) {
pub fn multiset() -> (MultiSet<String, u64>, u64) {
let mut rng = StdRng::seed_from_u64(SEED);
let mut multiset = MultiSet::new();
let elems = elements(&mut rng);

for _ in 0..ADD_COUNT {
let elem_count = rng.gen_range(1, ELEM_COUNT) as usize;
let set: Vec<String> = elems
let set: Vec<(String, u64)> = elems
.choose_multiple(&mut rng, elem_count)
.cloned()
.map(|x| (x, 1))
.collect();
multiset.add(set);
}
Expand Down

0 comments on commit ab92282

Please sign in to comment.