diff --git a/examples/multiple-scenario.js b/examples/multiple-scenario.js index 69d6dfbaf..3c2afda12 100644 --- a/examples/multiple-scenario.js +++ b/examples/multiple-scenario.js @@ -17,7 +17,7 @@ export const options = { }, }, thresholds: { - webvital_first_contentful_paint: ['max < 1000'], + browser_web_vital_fcp: ['max < 1000'], checks: ["rate==1.0"] } } diff --git a/k6ext/metrics.go b/k6ext/metrics.go index d72710091..77d0fe0c9 100644 --- a/k6ext/metrics.go +++ b/k6ext/metrics.go @@ -24,12 +24,12 @@ type CustomMetrics struct { // VU Registry and returns our internal struct pointer. func RegisterCustomMetrics(registry *k6metrics.Registry) *CustomMetrics { wvs := map[string]string{ - webVitalFID: "webvital_first_input_delay", - webVitalTTFB: "webvital_time_to_first_byte", - webVitalLCP: "webvital_largest_content_paint", - webVitalCLS: "webvital_cumulative_layout_shift", - webVitalINP: "webvital_interaction_to_next_paint", - webVitalFCP: "webvital_first_contentful_paint", + webVitalFID: "browser_web_vital_fid", + webVitalTTFB: "browser_web_vital_ttfb", + webVitalLCP: "browser_web_vital_lcp", + webVitalCLS: "browser_web_vital_cls", + webVitalINP: "browser_web_vital_inp", + webVitalFCP: "browser_web_vital_fcp", } webVitals := make(map[string]*k6metrics.Metric) diff --git a/tests/webvital_test.go b/tests/webvital_test.go index 685adde98..73673b4de 100644 --- a/tests/webvital_test.go +++ b/tests/webvital_test.go @@ -20,16 +20,16 @@ func TestWebVitalMetric(t *testing.T) { browser = newTestBrowser(t, withFileServer(), withSamplesListener(samples)) page = browser.NewPage(nil) expected = map[string]bool{ - "webvital_time_to_first_byte": false, - "webvital_time_to_first_byte_good": false, - "webvital_first_contentful_paint": false, - "webvital_first_contentful_paint_good": false, - "webvital_largest_content_paint": false, - "webvital_largest_content_paint_good": false, - "webvital_first_input_delay": false, - "webvital_first_input_delay_good": false, - "webvital_cumulative_layout_shift": false, - "webvital_cumulative_layout_shift_good": false, + "browser_web_vital_ttfb": false, + "browser_web_vital_ttfb_good": false, + "browser_web_vital_fcp": false, + "browser_web_vital_fcp_good": false, + "browser_web_vital_lcp": false, + "browser_web_vital_lcp_good": false, + "browser_web_vital_fid": false, + "browser_web_vital_fid_good": false, + "browser_web_vital_cls": false, + "browser_web_vital_cls_good": false, } )