mirror of https://github.com/kubernetes/kops.git
nodeup: fix logging of download times
We were capturing the time before waiting for the download.
This commit is contained in:
parent
0bc3015ce6
commit
f03a1ece06
|
|
@ -117,7 +117,9 @@ func downloadURLAlways(url string, destPath string, dirMode os.FileMode) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
defer klog.V(2).Infof("Copying %q to %q took %q", url, destPath, time.Since(start))
|
defer func() {
|
||||||
|
klog.V(2).Infof("Copying %q to %q took %q", url, destPath, time.Since(start))
|
||||||
|
}()
|
||||||
|
|
||||||
_, err = io.Copy(output, response.Body)
|
_, err = io.Copy(output, response.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue