提交 c034d0c8 编写于 作者: A Alex Crichton

test: Switch field privacy as necessary

上级 abd7dd83
...@@ -147,30 +147,30 @@ fn padding(&self) -> NamePadding { ...@@ -147,30 +147,30 @@ fn padding(&self) -> NamePadding {
/// set-up & tear-down before running a piece of code repeatedly via a /// set-up & tear-down before running a piece of code repeatedly via a
/// call to `iter`. /// call to `iter`.
pub struct BenchHarness { pub struct BenchHarness {
priv iterations: u64, iterations: u64,
priv ns_start: u64, ns_start: u64,
priv ns_end: u64, ns_end: u64,
bytes: u64 pub bytes: u64,
} }
// The definition of a single test. A test runner will run a list of // The definition of a single test. A test runner will run a list of
// these. // these.
#[deriving(Clone)] #[deriving(Clone)]
pub struct TestDesc { pub struct TestDesc {
name: TestName, pub name: TestName,
ignore: bool, pub ignore: bool,
should_fail: bool pub should_fail: bool,
} }
pub struct TestDescAndFn { pub struct TestDescAndFn {
desc: TestDesc, pub desc: TestDesc,
testfn: TestFn, pub testfn: TestFn,
} }
#[deriving(Clone, Encodable, Decodable, Eq, Show)] #[deriving(Clone, Encodable, Decodable, Eq, Show)]
pub struct Metric { pub struct Metric {
priv value: f64, value: f64,
priv noise: f64 noise: f64
} }
impl Metric { impl Metric {
...@@ -242,15 +242,15 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) { ...@@ -242,15 +242,15 @@ pub fn test_main_static(args: &[~str], tests: &[TestDescAndFn]) {
} }
pub struct TestOpts { pub struct TestOpts {
filter: Option<~str>, pub filter: Option<~str>,
run_ignored: bool, pub run_ignored: bool,
run_tests: bool, pub run_tests: bool,
run_benchmarks: bool, pub run_benchmarks: bool,
ratchet_metrics: Option<Path>, pub ratchet_metrics: Option<Path>,
ratchet_noise_percent: Option<f64>, pub ratchet_noise_percent: Option<f64>,
save_metrics: Option<Path>, pub save_metrics: Option<Path>,
test_shard: Option<(uint,uint)>, pub test_shard: Option<(uint,uint)>,
logfile: Option<Path> pub logfile: Option<Path>
} }
/// Result of parsing the options. /// Result of parsing the options.
...@@ -375,8 +375,8 @@ pub fn opt_shard(maybestr: Option<~str>) -> Option<(uint,uint)> { ...@@ -375,8 +375,8 @@ pub fn opt_shard(maybestr: Option<~str>) -> Option<(uint,uint)> {
#[deriving(Clone, Eq)] #[deriving(Clone, Eq)]
pub struct BenchSamples { pub struct BenchSamples {
priv ns_iter_summ: stats::Summary, ns_iter_summ: stats::Summary,
priv mb_s: uint mb_s: uint,
} }
#[deriving(Clone, Eq)] #[deriving(Clone, Eq)]
......
...@@ -130,18 +130,18 @@ pub trait Stats { ...@@ -130,18 +130,18 @@ pub trait Stats {
#[deriving(Clone, Eq)] #[deriving(Clone, Eq)]
#[allow(missing_doc)] #[allow(missing_doc)]
pub struct Summary { pub struct Summary {
sum: f64, pub sum: f64,
min: f64, pub min: f64,
max: f64, pub max: f64,
mean: f64, pub mean: f64,
median: f64, pub median: f64,
var: f64, pub var: f64,
std_dev: f64, pub std_dev: f64,
std_dev_pct: f64, pub std_dev_pct: f64,
median_abs_dev: f64, pub median_abs_dev: f64,
median_abs_dev_pct: f64, pub median_abs_dev_pct: f64,
quartiles: (f64,f64,f64), pub quartiles: (f64,f64,f64),
iqr: f64, pub iqr: f64,
} }
impl Summary { impl Summary {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册