#![feature(test)]

extern crate test;
extern crate bio;

use test::Bencher;

use bio::seq_analysis::orf::Finder;
use bio::seq_analysis::gc::*;


// 5,000 random nucleotides, GC content = .55
static STR_1: &'static [u8] = b"[encoded data, 5000 characters]";

#[bench]
fn bench_orf(b: &mut Bencher) {
    let start_codons = vec!(b"ATG");
    let stop_codons  = vec!(b"TGA", b"TAG", b"TAA");
    let finder = Finder::new(start_codons, stop_codons, 100usize);
    b.iter(|| { finder.find_all(STR_1).count() });
}

#[bench]
fn bench_gc(b: &mut Bencher) {
	b.iter(|| gc_content(STR_1));
}