This commit is contained in:
Robin Appelman 2025-06-02 23:14:57 +02:00
commit 95119b9347
13 changed files with 157 additions and 161 deletions

View file

@ -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();
})

View file

@ -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(),