Commit ab8574c
feat: add
Add a new `analyze size` subcommand to ll-cli that reports on-disk usage
of installed layers, breaking each module's footprint into:
- exclusive: bytes unique to that module
- shared: bytes shared with at least one other module
- logical: exclusive + shared (apparent size to the module)
- actual: shared bytes divided across the sharing modules
Sizes are computed from st_blocks (real block usage, not file size),
and hard-linked inodes are deduplicated by (st_dev, st_ino) so they
are counted once per sharing module. A separate pass reports the
total real disk usage of the repository directory for cross-reference.
Options:
--sort {actual|logical|exclusive|shared|id} (default: actual)
--asc (default: descending)
Signed-off-by: reddevillg <reddevillg@gmail.com>ll-cli analyze size subcommand1 parent 0aeb0f3 commit ab8574c
9 files changed
Lines changed: 506 additions & 5 deletions
File tree
- apps/ll-cli/src
- libs/linglong/src/linglong
- cli
- repo
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
435 | 469 | | |
436 | 470 | | |
437 | 471 | | |
| |||
566 | 600 | | |
567 | 601 | | |
568 | 602 | | |
| 603 | + | |
569 | 604 | | |
570 | 605 | | |
571 | 606 | | |
| |||
587 | 622 | | |
588 | 623 | | |
589 | 624 | | |
| 625 | + | |
590 | 626 | | |
591 | 627 | | |
592 | 628 | | |
| |||
743 | 779 | | |
744 | 780 | | |
745 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
746 | 790 | | |
747 | 791 | | |
748 | 792 | | |
| |||
0 commit comments