Add timing information for chroot building step

This timing should be printed to assist in evaluating the move to the
new chroot builder.

Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit is contained in:
Matthew Johnson
2018-02-15 12:17:23 -08:00
parent 9774b3df26
commit b7c2cf8d15
+7
View File
@@ -1204,6 +1204,11 @@ func (b *Builder) BuildChroots(template *x509.Certificate, privkey *rsa.PrivateK
// Generate the yum config file if it does not exist.
// This takes the template and adds the relevant local rpm repo path if needed
fmt.Println("Building chroots..")
timer := &stopWatch{w: os.Stdout}
defer timer.WriteSummary(os.Stdout)
timer.Start("BUILD CHROOTS")
if _, err := os.Stat(b.YumConf); os.IsNotExist(err) {
outfile, err := os.Create(b.YumConf)
if err != nil {
@@ -1323,6 +1328,8 @@ func (b *Builder) BuildChroots(template *x509.Certificate, privkey *rsa.PrivateK
// TODO: Remove all the files-* entries since they're now copied into the noship dir
// do code stuff here
timer.Stop()
return nil
}