提交 c6ec4f43 编写于 作者: S Scott Olson

Reorganize benches.

上级 f4cf3f36
#![feature(custom_attribute, test)]
#![feature(rustc_private)]
#![allow(unused_attributes)]
#![feature(test, rustc_private)]
extern crate test;
use test::Bencher;
mod fibonacci_helper;
mod helpers;
use helpers::*;
#[bench]
fn fib(bencher: &mut Bencher) {
......@@ -14,15 +12,11 @@ fn fib(bencher: &mut Bencher) {
})
}
mod miri_helper;
#[bench]
fn fib_miri(bencher: &mut Bencher) {
miri_helper::run("fibonacci_helper", bencher);
}
mod fibonacci_helper_iterative;
#[bench]
fn fib_iter(bencher: &mut Bencher) {
bencher.iter(|| {
......
#![feature(custom_attribute, test)]
#![feature(rustc_private)]
#![allow(unused_attributes)]
extern crate getopts;
extern crate miri;
extern crate rustc;
......@@ -32,7 +28,7 @@ fn find_sysroot() -> String {
pub fn run(filename: &str, bencher: &mut Bencher) {
let args = &[
"miri".to_string(),
format!("benches/{}.rs", filename),
format!("benches/helpers/{}.rs", filename),
"--sysroot".to_string(),
find_sysroot()
];
......
// This module gets included in multiple crates, and they each only use part of it.
#![allow(dead_code)]
pub mod fibonacci_helper;
pub mod fibonacci_helper_iterative;
pub mod miri_helper;
pub mod smoke_helper;
#![feature(custom_attribute, test)]
#![feature(rustc_private)]
#![allow(unused_attributes)]
#![feature(test, rustc_private)]
extern crate test;
use test::Bencher;
mod smoke_helper;
mod helpers;
use helpers::*;
#[bench]
fn noop(bencher: &mut Bencher) {
......@@ -33,8 +31,6 @@ fn noop_miri_full(bencher: &mut Bencher) {
}
*/
mod miri_helper;
#[bench]
fn noop_miri_interpreter(bencher: &mut Bencher) {
miri_helper::run("smoke_helper", bencher);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册