mirror of
https://codeberg.org/icewind/tf-log-parser.git
synced 2026-06-03 10:14:10 +02:00
more edge case handling
This commit is contained in:
parent
9114397803
commit
2dcd691f66
9 changed files with 37 additions and 24 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use indicatif::ParallelProgressIterator;
|
||||
use main_error::MainError;
|
||||
use rayon::prelude::*;
|
||||
use std::env::args;
|
||||
|
|
@ -21,6 +22,7 @@ fn main() -> Result<(), MainError> {
|
|||
.into_iter()
|
||||
.flatten()
|
||||
.par_bridge()
|
||||
.progress_count(2_500_000)
|
||||
.for_each(|entry| {
|
||||
let path = entry.path();
|
||||
if path.extension() == Some(OsStr::new("log")) {
|
||||
|
|
@ -34,10 +36,6 @@ fn main() -> Result<(), MainError> {
|
|||
}
|
||||
};
|
||||
|
||||
if count.load(Ordering::Relaxed) % 1_000 == 0 {
|
||||
println!("{}", path.display());
|
||||
}
|
||||
|
||||
read_time.fetch_add(read_start.elapsed().as_micros() as usize, Ordering::Relaxed);
|
||||
let parse_start = Instant::now();
|
||||
let (output, _) = match parse(&input) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue