From 03980de072058d3b5a5c39484e005aaef7cdd8b5 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Thu, 23 Jul 2026 13:53:23 +0200 Subject: [PATCH 1/2] git-reader: gitupdate: show size on init and add more logs about tags --- git-reader/run.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/git-reader/run.sh b/git-reader/run.sh index c7fb9f22..87c09b37 100644 --- a/git-reader/run.sh +++ b/git-reader/run.sh @@ -13,7 +13,14 @@ log_sizes() { git_size=$(du -sh "$repo_path/.git/objects" 2>/dev/null | cut -f1) || true lfs_size=$(du -sh "$repo_path/.git/lfs" 2>/dev/null | cut -f1) || true log "Size of $repo_path: ${total_size} (git objects=${git_size:-n/a}, LFS=${lfs_size:-n/a})" - du -sh "$repo_path}/attachments/*/*" | sort -hr | head -n 10 + + log "Number of tags per collection (top 10):" + git -C "$repo_path" tag | sed 's|/[0-9]*$||' | sort | uniq -c | sort -rn | head -n 10 + echo "..." + + log "Size of attachments folders (top 10):" + du -sh "$repo_path"/attachments/*/* 2>/dev/null | sort -hr | head -n 10 + echo "..." } ORIGIN_NAME="origin" @@ -63,6 +70,8 @@ cmd_gitupdate() { log "Setting latest symlink to A..." ln -sfn "$repo_path/A" "$repo_path/latest" + log_sizes "$repo_path/latest" + # A was just cloned at origin HEAD and B is an exact copy, so there is # nothing to update yet. Return and let the next run pick up changes. LOG_PREFIX="" From 417e6f47caea2512a9c77449fbecf14b837f6b72 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Thu, 23 Jul 2026 14:14:13 +0200 Subject: [PATCH 2/2] Show number of files too --- git-reader/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/git-reader/run.sh b/git-reader/run.sh index 87c09b37..92b32aa6 100644 --- a/git-reader/run.sh +++ b/git-reader/run.sh @@ -14,6 +14,11 @@ log_sizes() { lfs_size=$(du -sh "$repo_path/.git/lfs" 2>/dev/null | cut -f1) || true log "Size of $repo_path: ${total_size} (git objects=${git_size:-n/a}, LFS=${lfs_size:-n/a})" + local file_count lfs_count + file_count=$(git -C "$repo_path" ls-files | wc -l) + lfs_count=$(git -C "$repo_path" lfs ls-files | wc -l) + log "Number of files: ${file_count} (LFS=${lfs_count})" + log "Number of tags per collection (top 10):" git -C "$repo_path" tag | sed 's|/[0-9]*$||' | sort | uniq -c | sort -rn | head -n 10 echo "..."