From df975778fc263eb1a7be498bf9daaebbfc4961c4 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Mon, 28 Mar 2016 18:02:09 -0700 Subject: [PATCH] Log time taken to set sandbox key Signed-off-by: Alessandro Boch --- libnetwork/sandbox.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libnetwork/sandbox.go b/libnetwork/sandbox.go index 7fc5bdeead..18cca78dca 100644 --- a/libnetwork/sandbox.go +++ b/libnetwork/sandbox.go @@ -7,6 +7,7 @@ import ( "net" "strings" "sync" + "time" log "github.com/Sirupsen/logrus" "github.com/docker/libnetwork/etchosts" @@ -536,6 +537,11 @@ func (sb *sandbox) resolveName(req string, networkName string, epList []*endpoin } func (sb *sandbox) SetKey(basePath string) error { + start := time.Now() + defer func() { + log.Debugf("sandbox set key processing took %s for container %s", time.Now().Sub(start), sb.ContainerID()) + }() + if basePath == "" { return types.BadRequestErrorf("invalid sandbox key") }