feat: optimization refactor, test suite, and dependency cleanup
Refactored the application to improve performance, maintainability, and binary size. Key Changes: - **Core Algorithm**: Switched to a parallel, single-pass tree construction algorithm for O(N) traversal. - **Architecture**: Extract core logic from `main.rs` to `lib.rs` to enable unit testing. - **Testing**: Added comprehensive unit tests and integration tests (`tests/cli.rs`) covering CLI arguments and output formats. - **Benchmarking**: Added `criterion` benchmarks for performance tracking. - **Dependencies**: - Removed `walkdir` (logic replaced by `ignore` + custom tree). - Removed `humansize` (consolidated to `byte-unit`). - Replaced `chrono` with lightweight `time` crate. - Removed unused `atty`. - **Reporting**: Optimized CSV and JSON output for correctness and zero-copy performance. - **Documentation**: Updated CHANGELOG.md and bumped version to 0.2.0.
This commit is contained in:
+12
-3
@@ -7,7 +7,6 @@ edition = "2021"
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
|
||||
rayon = "1.8"
|
||||
humansize = "2.1"
|
||||
colored = "2.0"
|
||||
comfy-table = "7.0"
|
||||
byte-unit = "5.0"
|
||||
@@ -16,7 +15,17 @@ ignore = "0.4"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
csv = "1.3"
|
||||
chrono = "0.4"
|
||||
time = { version = "0.3", features = ["macros", "formatting"] }
|
||||
clap_complete = "4.4"
|
||||
atty = "0.2"
|
||||
clap_mangen = "0.2.31"
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "2.0"
|
||||
predicates = "3.1"
|
||||
tempfile = "3.10"
|
||||
criterion = "0.5"
|
||||
|
||||
[[bench]]
|
||||
name = "benchmark"
|
||||
harness = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user