#[macro_use] extern crate bencher; extern crate rust__utils; use rust__utils::{snowflake,geohash}; use bencher::Bencher; fn geohash(bench: &mut Bencher) { bench.iter(|| { let lat = 40.463833; let lng = -79.972422; geohash::encode(lat, lng) }); } fn snowflake(bench: &mut Bencher) { let mut worker = snowflake::SnowflakeWorker::new(0,0); bench.iter(|| { worker.gen() }) } benchmark_group!(benches, geohash); benchmark_main!(benches);