From 36328f4f8a6fe64fbb1a9439cbccc17048295e76 Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Thu, 22 Feb 2018 11:37:52 -0800 Subject: [PATCH] Add a timer to delta pack creation Signed-off-by: Matthew Johnson --- builder/builder.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/builder/builder.go b/builder/builder.go index cc807bb..5f2d3d4 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -1902,6 +1902,10 @@ func (b *Builder) BuildDeltaPacksPreviousVersions(prev, to uint32, printReport b } func createDeltaPacks(from *swupd.Manifest, to *swupd.Manifest, printReport bool, outputDir, chrootDir string, numWorkers int) error { + timer := &stopWatch{w: os.Stdout} + defer timer.WriteSummary(os.Stdout) + timer.Start("CREATE DELTA PACKS") + fmt.Printf("Creating delta packs from %d to %d\n", from.Header.Version, to.Header.Version) bundlesToPack, err := swupd.FindBundlesToPack(from, to) if err != nil { @@ -1954,6 +1958,8 @@ func createDeltaPacks(from *swupd.Manifest, to *swupd.Manifest, printReport bool fmt.Printf(" Fullfiles in pack: %d\n", info.FullfileCount) fmt.Printf(" Deltas in pack: %d\n", info.DeltaCount) } + + timer.Stop() return nil }