some event parsing

This commit is contained in:
Robin Appelman 2021-08-07 22:07:59 +02:00
commit e83f7928aa
7 changed files with 282 additions and 61 deletions

11
benches/bench.rs Normal file
View file

@ -0,0 +1,11 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use std::fs::read_to_string;
use tf_log_parser::parse;
pub fn parse_benchmark(c: &mut Criterion) {
let input = read_to_string("test_data/log_2892242.log").unwrap();
c.bench_function("parse 2892242", |b| b.iter(|| parse(black_box(&input))));
}
criterion_group!(benches, parse_benchmark);
criterion_main!(benches);