%% date:: [[2023-11-03]] parent:: %% # [[Automated performance modeling with NASA Open MCT Grafana Cloud and k6]] speaker:: "[[John Hill]]" conference:: "[[GrafanaCON 2023]]" - Web UI test engineer at KBR, a NASA contractor - [[Playwright]] ambassador - [[k6 (tool)|k6]] champion [[Open MCT]] - [repo](https://github.com/nasa/openmct) - web-based mission control framework - Open Mission Control Technologies - the most-starred open source NASA project on GitHub - you can add your own telemetry sources - lets each scientist tweak and extend their own views - has also been used by the Red Bull Formula One racing team - principal way it's being used: Viper mission in 2024 - part of larger Artemis program - sending a Lunar Rover to south pole of the moon to prospect and drill for water ## 3 frontend performance problems - What's being requested on backend is different from what's happening on frontend - Backend gets the credit and the blame: it's the bearer of bad news - Silos - Silos between frontend devs and performance testing and infra teams - perf tools can't run in prod/qa/staging so usefulness of results is limited - [[Synthetic monitoring]] is fragile and owned by the wrong team - Frontend changes require changes to the script too ## Performance in context of Open MCT - How can we make Open MCT performant? - https://github.com/unlikelyzero/openmct-performance - soon: `docker compose up` - example repo on how to integrate k6 with telemetry plugin and Grafana - ## How to integrate frontend and backend performance with k6 - [[k6 (tool)|k6]] as a library to solve problems - [[k6 browser]] with [[Playwright]] APIs: [[Puppeteer]], [[Selenium]] - measurements feed into many backends - Record browser test with Playwright tooling - `npm run test:record` - Uses [[Aria]] locators, as recommended. - Record and convert HAR files with har-to-k6 - Browser + HTTP + APM + infra ## How to sync frontend performance with development - Aria locators are the [[Web Accessibility Standards]] that are less likely to change. - An aria locator is a contract (like schema contract testing) - k6 has a community plugin to let you share libraries between Playwright and k6. -