- [x] parallelization
    - [x] (scanning) + (processing sw & processing hw & formatting & printing)
- [x] reduce cloning values on the heap
- [x] add a partial hashing mode (--strict)
- [x] add unit tests
- [x] add silent mode
- [x] update documentation
- [x] remove color output
- [x] progress bar improvements
    - [x] use progress bar groups
- [x] remove broken json rendering
- [x] add benchmarks
This commit is contained in:
Sreedev Kodichath
2025-07-13 19:03:14 -04:00
committed by GitHub
parent f9e86f8522
commit 58e33cc8da
13 changed files with 1085 additions and 482 deletions

View File

@@ -4,28 +4,32 @@ mod interactive;
mod params;
mod processor;
mod scanner;
mod server;
use self::{formatter::Formatter, interactive::Interactive, server::Server};
use anyhow::Result;
use clap::Parser;
use formatter::Formatter;
use params::Params;
use processor::Processor;
use scanner::Scanner;
use std::sync::atomic::Ordering;
fn main() -> Result<()> {
let app_args = Params::parse();
let scan_results = Scanner::build(&app_args)?.scan()?;
let mut processor = Processor::new(scan_results);
let server = Server::new(app_args.clone());
processor.sizewise()?;
processor.hashwise()?;
let results = processor.hashwise_results;
server.start()?;
match app_args.interactive {
false => Formatter::print(results, processor.max_path_len, &app_args)?,
true => interactive::init(results, &app_args)?,
}
false => {
Formatter::print(
server.hw_duplicate_set,
server.max_file_path_len.load(Ordering::Acquire),
&app_args,
)?;
}
true => {
Interactive::init(server.hw_duplicate_set, &app_args)?;
}
};
Ok(())
}