2019-01-10 12:58:13 +00:00
|
|
|
#![feature(test)]
|
|
|
|
|
|
|
|
extern crate test;
|
|
|
|
|
2019-06-26 14:53:08 +01:00
|
|
|
use orgize::Org;
|
2019-01-10 12:58:13 +00:00
|
|
|
use test::Bencher;
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn org_syntax(b: &mut Bencher) {
|
|
|
|
// wget https://orgmode.org/worg/sources/dev/org-syntax.org
|
|
|
|
b.iter(|| {
|
2019-06-27 06:20:21 +01:00
|
|
|
Org::parse(include_str!("org-syntax.org"));
|
2019-01-10 12:58:13 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn doc(b: &mut Bencher) {
|
|
|
|
// wget https://orgmode.org/worg/sources/doc.org
|
|
|
|
b.iter(|| {
|
2019-06-27 06:20:21 +01:00
|
|
|
Org::parse(include_str!("doc.org"));
|
2019-01-10 12:58:13 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
#[bench]
|
|
|
|
fn org_faq(b: &mut Bencher) {
|
|
|
|
// wget https://orgmode.org/worg/sources/org-faq.org
|
|
|
|
b.iter(|| {
|
2019-06-27 06:20:21 +01:00
|
|
|
Org::parse(include_str!("org-faq.org"));
|
2019-01-10 12:58:13 +00:00
|
|
|
})
|
|
|
|
}
|