Browse code

Add layer id to NaiveDiffDriver untar timing log

Signed-off-by: Cody Roseborough <crrosebo@amazon.com>

Cody Roseborough authored on 2018/10/03 07:14:31
Showing 1 changed files
... ...
@@ -145,11 +145,11 @@ func (gdw *NaiveDiffDriver) ApplyDiff(id, parent string, diff io.Reader) (size i
145 145
 	options := &archive.TarOptions{UIDMaps: gdw.uidMaps,
146 146
 		GIDMaps: gdw.gidMaps}
147 147
 	start := time.Now().UTC()
148
-	logrus.Debug("Start untar layer")
148
+	logrus.WithField("id", id).Debug("Start untar layer")
149 149
 	if size, err = ApplyUncompressedLayer(layerFs, diff, options); err != nil {
150 150
 		return
151 151
 	}
152
-	logrus.Debugf("Untar time: %vs", time.Now().UTC().Sub(start).Seconds())
152
+	logrus.WithField("id", id).Debugf("Untar time: %vs", time.Now().UTC().Sub(start).Seconds())
153 153
 
154 154
 	return
155 155
 }