Skip to content

Commit

Permalink
Merge ab92282 into 3a2147c
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorenesduarte committed Mar 18, 2019
2 parents 3a2147c + ab92282 commit dd04cb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -33,6 +33,7 @@ before_script:

script:
- cargo build && cargo test
- cargo bench

after_success: |
if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
Expand Down
5 changes: 3 additions & 2 deletions benches/threshold_bench.rs
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 dd04cb5

Please sign in to comment.