about summary refs log tree commit diff
path: root/src/libstd/num
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-04-11 10:01:43 -0700
committerbors <bors@rust-lang.org>2014-04-11 10:01:43 -0700
commit8b6091e8f1f5531fe907f84b6a2b27af04a95e8f (patch)
tree506ee280622b0c9e50c528b86d65cd8ff1f79122 /src/libstd/num
parent65abf96fb6630d7ddbcdc3b39f599c02ecfc2f1e (diff)
parent408f484b660d507617d5293c03942b5b5dd7bc0a (diff)
downloadrust-8b6091e8f1f5531fe907f84b6a2b27af04a95e8f.tar.gz
rust-8b6091e8f1f5531fe907f84b6a2b27af04a95e8f.zip
auto merge of #13236 : liigo/rust/rename-benchharness, r=huonw
Closes #12640

based on PR #13030, rebased, and passed all tests.
Diffstat (limited to 'src/libstd/num')
-rw-r--r--src/libstd/num/mod.rs4
-rw-r--r--src/libstd/num/strconv.rs50
2 files changed, 27 insertions, 27 deletions
diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs
index 9d0b53f945f..52167fa58b9 100644
--- a/src/libstd/num/mod.rs
+++ b/src/libstd/num/mod.rs
@@ -1773,13 +1773,13 @@ mod tests {
 #[cfg(test)]
 mod bench {
     extern crate test;
-    use self::test::BenchHarness;
+    use self::test::Bencher;
     use num;
     use slice;
     use prelude::*;
 
     #[bench]
-    fn bench_pow_function(b: &mut BenchHarness) {
+    fn bench_pow_function(b: &mut Bencher) {
         let v = slice::from_fn(1024, |n| n);
         b.iter(|| {v.iter().fold(0, |old, new| num::pow(old, *new));});
     }
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs
index b15b5872fc2..3ce9a3d0764 100644
--- a/src/libstd/num/strconv.rs
+++ b/src/libstd/num/strconv.rs
@@ -815,86 +815,86 @@ mod bench {
     extern crate test;
 
     mod uint {
-        use super::test::BenchHarness;
+        use super::test::Bencher;
         use rand::{XorShiftRng, Rng};
         use num::ToStrRadix;
 
         #[bench]
-        fn to_str_bin(bh: &mut BenchHarness) {
+        fn to_str_bin(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<uint>().to_str_radix(2); })
+            b.iter(|| { rng.gen::<uint>().to_str_radix(2); })
         }
 
         #[bench]
-        fn to_str_oct(bh: &mut BenchHarness) {
+        fn to_str_oct(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<uint>().to_str_radix(8); })
+            b.iter(|| { rng.gen::<uint>().to_str_radix(8); })
         }
 
         #[bench]
-        fn to_str_dec(bh: &mut BenchHarness) {
+        fn to_str_dec(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<uint>().to_str_radix(10); })
+            b.iter(|| { rng.gen::<uint>().to_str_radix(10); })
         }
 
         #[bench]
-        fn to_str_hex(bh: &mut BenchHarness) {
+        fn to_str_hex(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<uint>().to_str_radix(16); })
+            b.iter(|| { rng.gen::<uint>().to_str_radix(16); })
         }
 
         #[bench]
-        fn to_str_base_36(bh: &mut BenchHarness) {
+        fn to_str_base_36(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<uint>().to_str_radix(36); })
+            b.iter(|| { rng.gen::<uint>().to_str_radix(36); })
         }
     }
 
     mod int {
-        use super::test::BenchHarness;
+        use super::test::Bencher;
         use rand::{XorShiftRng, Rng};
         use num::ToStrRadix;
 
         #[bench]
-        fn to_str_bin(bh: &mut BenchHarness) {
+        fn to_str_bin(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<int>().to_str_radix(2); })
+            b.iter(|| { rng.gen::<int>().to_str_radix(2); })
         }
 
         #[bench]
-        fn to_str_oct(bh: &mut BenchHarness) {
+        fn to_str_oct(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<int>().to_str_radix(8); })
+            b.iter(|| { rng.gen::<int>().to_str_radix(8); })
         }
 
         #[bench]
-        fn to_str_dec(bh: &mut BenchHarness) {
+        fn to_str_dec(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<int>().to_str_radix(10); })
+            b.iter(|| { rng.gen::<int>().to_str_radix(10); })
         }
 
         #[bench]
-        fn to_str_hex(bh: &mut BenchHarness) {
+        fn to_str_hex(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<int>().to_str_radix(16); })
+            b.iter(|| { rng.gen::<int>().to_str_radix(16); })
         }
 
         #[bench]
-        fn to_str_base_36(bh: &mut BenchHarness) {
+        fn to_str_base_36(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { rng.gen::<int>().to_str_radix(36); })
+            b.iter(|| { rng.gen::<int>().to_str_radix(36); })
         }
     }
 
     mod f64 {
-        use super::test::BenchHarness;
+        use super::test::Bencher;
         use rand::{XorShiftRng, Rng};
         use f64;
 
         #[bench]
-        fn float_to_str(bh: &mut BenchHarness) {
+        fn float_to_str(b: &mut Bencher) {
             let mut rng = XorShiftRng::new().unwrap();
-            bh.iter(|| { f64::to_str(rng.gen()); })
+            b.iter(|| { f64::to_str(rng.gen()); })
         }
     }
 }