Add a full-document parse benchmark.
This commit is contained in:
@@ -208,3 +208,17 @@ fn _document<'b, 'g, 'r, 's>(
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use test::Bencher;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[bench]
|
||||
fn bench_full_document(b: &mut Bencher) {
|
||||
let input = include_str!("../../org_mode_samples/element_container_priority/README.org");
|
||||
|
||||
b.iter(|| assert!(parse(input).is_ok()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user