Conversation
Performance Regression Reportscommit: 4d4ceea There are no regressions. |
KSXGitHub
commented
Jul 26, 2025
KSXGitHub
commented
Jul 26, 2025
KSXGitHub
commented
Jul 26, 2025
KSXGitHub
commented
Jul 26, 2025
KSXGitHub
commented
Jul 26, 2025
KSXGitHub
commented
Jul 26, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements hardlink deduplication functionality to accurately calculate disk usage when hardlinks are present. When enabled via --deduplicate-hardlinks, the tool detects files with multiple links and adjusts the reported sizes to avoid double-counting the same data.
Key changes include:
- Detection and recording of hardlinks during filesystem traversal
- Deduplication logic that reduces sizes in the data tree for hardlinked files
- JSON output enhancement to include hardlink information with summary and detailed reporting
Reviewed Changes
Copilot reviewed 48 out of 49 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tests/usual_cli.rs |
Updated test constructors to use new FsTreeBuilder signature with hardlink recorder |
tests/json.rs |
Modified JSON tests to handle new JsonTree structure with hardlink information |
tests/hardlinks_*.rs |
Added comprehensive test suites for hardlink functionality with and without deduplication |
tests/cli_errors.rs |
Updated error test to use new FsTreeBuilder signature |
tests/_utils.rs |
Added utilities for creating test workspaces with hardlinks and symlinks |
src/runtime_error.rs |
Added error types for unsupported features on non-POSIX platforms |
src/reporter/ |
Enhanced progress reporting to include hardlink detection statistics |
src/lib.rs |
Added new modules for hardlink and inode handling |
src/json_data.rs |
Extended JSON data structure to include hardlink information |
src/inode.rs |
New module for inode number handling |
src/hardlink/ |
Complete hardlink detection, recording, and deduplication system |
src/fs_tree_builder.rs |
Updated to support hardlink recording during tree construction |
src/data_tree/ |
Added hardlink deduplication logic to data tree |
src/args.rs |
Added CLI flags for hardlink deduplication and JSON output control |
src/app/ |
Updated application logic to handle hardlink processing and reporting |
Comments suppressed due to low confidence (1)
src/hardlink/aware.rs:105
- Silently ignoring errors from hardlink recording could mask important issues and make debugging difficult. Consider logging the error or handling it more explicitly.
.map(|values| (*values.size(), values.paths().clone()))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO:
stats.nlink() - links.len().More efficient data structure to insert detected hardlinks (Vecrandomly pauses).--help.dustto include--no-progress#297HooktoRecordHardlinks,DoNothingtoIgnorant.