<commit_before>#![allow(unstable)]

extern crate test;
extern crate wheel_timer;

use test::Bencher;

use wheel_timer::WheelTimer;

#[bench]
fn bench_wheel_timer_drain(b: &mut Bencher) {
  let max_interval = 20;
  let mut timer = WheelTimer::new(max_interval);

  b.iter(|| {
    // Fill
    for j in range(0us, 100) {
      timer.schedule(j%max_interval, j%max_interval);
    }

    // Drain
    for _ in timer {
      continue;
    }
  });
}<commit_msg>Fixing up benches<commit_after>#![feature(core)]
#![feature(test)]

extern crate test;
extern crate wheel_timer;

use test::Bencher;

use wheel_timer::WheelTimer;

#[bench]
fn bench_wheel_timer_drain(b: &mut Bencher) {
  let max_interval = 20;
  let mut timer = WheelTimer::new(max_interval);

  b.iter(|| {
    // Fill
    for j in range(0us, 100) {
      timer.schedule(j%max_interval, j%max_interval);
    }

    // Drain
    for _ in range(0, 100) {
      timer.tick();
    }
  });
}
{'fraction_non_alphanumeric': 0.14225053078556263, 'fraction_numerical': 0.016985138004246284, 'mean_word_length': 3.365740740740741, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3488569', 'n_tokens_mistral': 371, 'n_tokens_neox': 349, 'n_words': 78}