Skip to content

Migrate load performance widget to v2

What does this MR do and why?

For #439132 (closed), part of &10460

Migrate the load performance widget extension to v2 of the merge request widget framework

Convert index.js to index.vue
Remove extension from mr_widget_options
Import and add it to the widgets app
Update tests

FYI: This widget is very similar to the browser performance widget, which has already been migrated in Migrate browser performance widget to V2 (!136776 - merged)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screen_Recording_2024-01-26_at_17.28.44 Screen_Recording_2024-01-26_at_17.27.26

How to set up and validate locally

  1. find/make a project that generates load performance reports
expand for more details on this setup

option 1: clone this project into your gdk - it uses two sample json files as the artifacts:reports:load_performance artifacts for the default branch and for other branches so that they can be compared by the widget

option 2: use a docker-in-docker runner and the load performance CI template and then provide the relative path to k6's output file as K6_TEST_FILE:

include:
  template: Verify/Load-Performance-Testing.gitlab-ci.yml

load_performance:
  variables:
    K6_TEST_FILE: <PATH TO K6 TEST FILE IN PROJECT>
  1. open a merge request in the project and make a change that should result in different load performance data
  2. run pipelines for the base commit and head commit of the merge request's branch (if they didn't run automatically)
  3. verify that the new version of the load performance widget shows the correct data (the diff between the base report and head report for the merge request's branch)
Edited by Miranda Fluharty

Merge request reports