download: Add timer to HTTP request

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This commit is contained in:
Torin Sandall
2021-12-07 13:54:38 -08:00
parent 9382389ada
commit a1dae2f79e
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -278,7 +278,9 @@ func (d *Downloader) download(ctx context.Context, m metrics.Metrics) (*download
}
}
m.Timer(metrics.BundleRequest).Start()
resp, err := d.client.Do(ctx, "GET", d.path)
m.Timer(metrics.BundleRequest).Stop()
if err != nil {
return nil, errors.Wrap(err, "request failed")
}