mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-06-03 10:14:10 +02:00
fixes
This commit is contained in:
parent
8d17b30682
commit
95119b9347
13 changed files with 157 additions and 161 deletions
|
|
@ -1,7 +1,8 @@
|
|||
use chrono::NaiveDateTime;
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
use flate2::read::GzDecoder;
|
||||
use std::fs::File;
|
||||
use std::hint::black_box;
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
|
|
@ -57,7 +58,7 @@ pub fn handle_event(c: &mut Criterion) {
|
|||
black_box(&events)
|
||||
.iter()
|
||||
.flat_map(|(event, raw_event)| {
|
||||
black_box(handler.process(&raw_event, &event, &mut start_time, &mut subjects))
|
||||
black_box(handler.process(raw_event, event, &mut start_time, &mut subjects))
|
||||
})
|
||||
.count();
|
||||
})
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ pub fn parse_benchmark() {
|
|||
|
||||
pub fn parse_raw() {
|
||||
black_box(
|
||||
LineSplit::new(black_box(&LOG))
|
||||
LineSplit::new(black_box(LOG))
|
||||
.filter(|line| !line.is_empty())
|
||||
.flat_map(RawEvent::parse)
|
||||
.count(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue