#![allow(unstable)]
extern crate sss;
extern crate test;

use std::collections::VecMap;
use std::rand::ChaChaRng;
use test::Bencher;

#[bench]
fn bench_combine(b: &mut Bencher) {
    let mut expected: VecMap<Vec<u8>> = VecMap::new();
    expected.insert(1, vec![118, 163, 66, 80, 187]);
    expected.insert(2, vec![239, 91, 129, 172, 98]);
    expected.insert(3, vec![152, 250, 192, 248, 220]);

    b.iter(|| {
        sss::combine(&expected)
    })
}

#[bench]
fn bench_split(b: &mut Bencher) {
    let mut rng = ChaChaRng::new_unseeded();
    let input = vec![1, 2, 3, 4, 5];

    b.iter(|| {
        sss::split(5, 3, &input, &mut rng);
    })
}

#![allow(unstable)]
extern crate sss;
extern crate test;

use std::collections::VecMap;
use std::rand::ChaChaRng;
use test::Bencher;

#[bench]
fn bench_combine(b: &mut Bencher) {
    let mut expected: VecMap<Vec<u8>> = VecMap::new();
    expected.insert(1, vec![118, 163, 66, 80, 187]);
    expected.insert(2, vec![239, 91, 129, 172, 98]);
    expected.insert(3, vec![152, 250, 192, 248, 220]);

    b.iter(|| {
        sss::combine(&expected)
    })
}

#[bench]
fn bench_split(b: &mut Bencher) {
    let mut rng = ChaChaRng::new_unseeded();
    let input = vec![1, 2, 3, 4, 5];

    b.iter(|| {
        sss::split(5, 3, &input, &mut rng)
    })
}

Make sure the bench loop isn't elided.
Make sure the bench loop isn't elided.
