Skip to content

Commit a3c2528

Browse files
committed
[registry-facade] Start time is not measuring GetSpec time
1 parent 965efd4 commit a3c2528

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/registry-facade/pkg/registry/manifest.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import (
3232
)
3333

3434
func (reg *Registry) handleManifest(ctx context.Context, r *http.Request) http.Handler {
35+
t0 := time.Now()
36+
3537
spname, name := getSpecProviderName(ctx)
3638
sp, ok := reg.SpecProvider[spname]
3739
if !ok {
@@ -72,11 +74,11 @@ func (reg *Registry) handleManifest(ctx context.Context, r *http.Request) http.H
7274
}
7375

7476
res := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
75-
t0 := time.Now()
7677
mhandler.ServeHTTP(w, r)
7778
dt := time.Since(t0)
7879
reg.metrics.ManifestHist.Observe(dt.Seconds())
7980
})
81+
8082
return res
8183
}
8284

0 commit comments

Comments
 (0)