Skip to content

Commit

Permalink
Log when beginning to wait and log wait duration on success
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrister committed Aug 7, 2015
1 parent 761e087 commit 8ae8b61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ func main() {

services := loadServicesFromEnv()

log.Printf("Waiting for %d services to be ready...", len(services))
begin := time.Now()

var wg sync.WaitGroup
cancel := make(chan struct{})

Expand Down Expand Up @@ -68,7 +71,7 @@ func main() {
log.Printf("Error: One or more services timed out after %d second(s)", *timeout)
os.Exit(1)
}
log.Printf("All services are up!")
log.Printf("All services are up after %v!", time.Now().Sub(begin))
}

func setupUsage() {
Expand Down

0 comments on commit 8ae8b61

Please sign in to comment.