Tighten up the timing around Dockerfile commands. (#514)

Right now this timing also includes the snapshot time.
This commit is contained in:
dlorenc 2019-01-09 10:34:23 -08:00 committed by GitHub
parent ee2baf8025
commit 2255837142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -227,6 +227,7 @@ func (s *stageBuilder) build() error {
return err return err
} }
files = command.FilesToSnapshot() files = command.FilesToSnapshot()
timing.DefaultRun.Stop(t)
if !s.shouldTakeSnapshot(index, files) { if !s.shouldTakeSnapshot(index, files) {
continue continue
@ -250,7 +251,6 @@ func (s *stageBuilder) build() error {
if err := s.saveSnapshotToImage(command.String(), tarPath); err != nil { if err := s.saveSnapshotToImage(command.String(), tarPath); err != nil {
return err return err
} }
timing.DefaultRun.Stop(t)
} }
if err := cacheGroup.Wait(); err != nil { if err := cacheGroup.Wait(); err != nil {
logrus.Warnf("error uploading layer to cache: %s", err) logrus.Warnf("error uploading layer to cache: %s", err)