Add bench
This commit is contained in:
parent
56de116595
commit
191868573d
|
@ -1,10 +1,11 @@
|
||||||
//! This crate tests using rocket_cors using Fairings
|
//! This crate tests using rocket_cors using Fairings
|
||||||
|
|
||||||
#![feature(plugin, custom_derive)]
|
#![feature(plugin, custom_derive, test)]
|
||||||
#![plugin(rocket_codegen)]
|
#![plugin(rocket_codegen)]
|
||||||
extern crate hyper;
|
extern crate hyper;
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
extern crate rocket_cors;
|
extern crate rocket_cors;
|
||||||
|
extern crate test;
|
||||||
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
@ -85,6 +86,13 @@ fn smoke_test() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use test::Bencher;
|
||||||
|
|
||||||
|
#[bench]
|
||||||
|
fn bench_smoke_test(b: &mut Bencher) {
|
||||||
|
b.iter(|| smoke_test());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn cors_options_check() {
|
fn cors_options_check() {
|
||||||
let client = Client::new(rocket()).unwrap();
|
let client = Client::new(rocket()).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue