File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
internal/js/modules/k6/browser Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ type browserRegistry struct {
184184
185185type browserBuildFunc func (ctx , vuCtx context.Context ) (* common.Browser , error )
186186
187+ var fidDeprecationWarningOnce sync.Once
188+
187189// newBrowserRegistry should only take a background context, not a context from
188190// k6 (i.e. vu). The reason for this is that we want to control the chromium
189191// lifecycle with the k6 event system.
@@ -208,6 +210,10 @@ func newBrowserRegistry(
208210 wsURL , isRemoteBrowser = remote .isRemoteBrowser ()
209211 )
210212
213+ fidDeprecationWarningOnce .Do (func () {
214+ vu .State ().Logger .Warnf ("FID has been deprecated and superseded by INP -- https://web.dev/blog/fid" )
215+ })
216+
211217 if isRemoteBrowser {
212218 b , err = bt .Connect (ctx , vuCtx , wsURL )
213219 if err != nil {
Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ import (
3636
3737const utilityWorldName = "__k6_browser_utility_world__"
3838
39- var fidDeprecationWarningOnce sync.Once
40-
4139// CPUProfile is used in throttleCPU.
4240type CPUProfile struct {
4341 // rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
@@ -347,10 +345,6 @@ func (fs *FrameSession) parseAndEmitWebVitalMetric(object string) error {
347345 return fmt .Errorf ("json couldn't be parsed: %w" , err )
348346 }
349347
350- fidDeprecationWarningOnce .Do (func () {
351- fs .logger .Warnf ("FrameSession:parseAndEmitWebVitalMetric" , "FID has been deprecated and superseded by INP -- https://web.dev/blog/fid" )
352- })
353-
354348 metric , ok := fs .k6Metrics .WebVitals [wv .Name ]
355349 if ! ok {
356350 return fmt .Errorf ("metric not registered %q" , wv .Name )
You can’t perform that action at this time.
0 commit comments