Skip to content

Commit

Permalink
fixup! survey: summarize total sizes by object type
Browse files Browse the repository at this point in the history
  • Loading branch information
dscho committed Sep 15, 2024
1 parent 201c604 commit b746e74
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions t/t8100-git-survey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ test_expect_success 'git survey (default)' '
git survey --all-refs >out 2>err &&
test_line_count = 0 err &&
test_oid_cache <<-EOF &&
commits_size_on_disk sha1: 1523
commits_size_on_disk sha256: 1811
commits_size sha1: 2153
commits_size sha256: 2609
trees_size_on_disk sha1: 495
trees_size_on_disk sha256: 635
trees_size sha1: 1706
trees_size sha256: 2366
EOF
cat >expect <<-EOF &&
GIT SURVEY for "$(pwd)"
-----------------------------------------------------
Expand All @@ -55,8 +69,8 @@ test_expect_success 'git survey (default)' '
===============================================
Object Type | Count | Disk Size | Inflated Size
------------+-------+-----------+--------------
Commits | 10 | 1523 | 2153
Trees | 10 | 495 | 1706
Commits | 10 | $(test_oid commits_size_on_disk) | $(test_oid commits_size)
Trees | 10 | $(test_oid trees_size_on_disk) | $(test_oid trees_size)
Blobs | 10 | 191 | 101
EOF
Expand Down

0 comments on commit b746e74

Please sign in to comment.