From 3bc355e503ec4a74a7afa84f3a519bdbb958ab8a Mon Sep 17 00:00:00 2001 From: Joe Lothan Date: Wed, 20 May 2026 09:46:59 -0400 Subject: [PATCH] improved bundle cli output with progress --- pipeline/05_bundle_gen/main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pipeline/05_bundle_gen/main.go b/pipeline/05_bundle_gen/main.go index 76a0397..1ce9e84 100644 --- a/pipeline/05_bundle_gen/main.go +++ b/pipeline/05_bundle_gen/main.go @@ -228,13 +228,16 @@ func main() { log.Fatalf("Failed to write bundle %d: %v", job.index, err) } + n := bundlesCreated.Add(1) + estimatedTotal := (totalHosts + cfg.EntriesPerBundle - 1) / cfg.EntriesPerBundle + if n%500 == 0 { + fmt.Printf(" %d/%d bundles\n", n, estimatedTotal) + } + logLine := fmt.Sprintf("bundle: %04d.json %dKB", job.index, len(job.data)/1024) - fmt.Println(logLine) if logWriter != nil { logWriter.Write(logLine, false) } - - bundlesCreated.Add(1) totalBytes.Add(int64(len(job.data))) } }()