mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-06-03 18:24:09 +02:00
some event parsing
This commit is contained in:
parent
d1b3525b2a
commit
e83f7928aa
7 changed files with 282 additions and 61 deletions
11
benches/bench.rs
Normal file
11
benches/bench.rs
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue