24 lines
669 B
Awk
24 lines
669 B
Awk
# derive.awk -- recompute the wizard-work per-lane census from git ls-tree.
|
|
#
|
|
# Input: `git ls-tree -r -l HEAD` lines: mode type object size path
|
|
# (default whitespace FS; $1=mode $2=type $3=object $4=size $5=path).
|
|
# Only paths under wizard-work/ are counted. Paths under this folder
|
|
# (the census publication itself) are excluded so the census does not
|
|
# depend on the files it publishes.
|
|
|
|
$5 ~ /^wizard-work\/ledger\/2026-10-28-git-tree-census\// { next }
|
|
|
|
{
|
|
split($5, a, "/")
|
|
lane = a[2]
|
|
cnt[lane]++
|
|
tot[lane] += $4
|
|
tcount++
|
|
tbytes += $4
|
|
}
|
|
|
|
END {
|
|
for (l in cnt) print l "\t" cnt[l] "\t" tot[l]
|
|
print "TOTAL\t" tcount "\t" tbytes
|
|
}
|