scaling.rs 634 B

1234567891011121314151617181920212223242526272829303132333435
  1. extern crate ralloc;
  2. mod util;
  3. #[test]
  4. #[ignore]
  5. fn big_alloc() {
  6. util::multiply(|| {
  7. let mut vec = Vec::new();
  8. let mut rand = 3u64;
  9. for _ in 0..0xBFFF {
  10. rand ^= 0xABFABFABFABF;
  11. rand = rand.rotate_left(3);
  12. util::acid(|| vec.push(rand));
  13. }
  14. });
  15. }
  16. #[test]
  17. #[ignore]
  18. fn many_small_allocs() {
  19. util::multiply(|| {
  20. let mut vec = Vec::new();
  21. let mut rand = 3u64;
  22. for _ in 0..3000 {
  23. rand ^= 0xABFABFABFABF;
  24. rand = rand.rotate_left(3);
  25. util::acid(|| vec.push(Box::new(rand)));
  26. }
  27. });
  28. }