-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor isRemoteBrowser check #889
Commits on May 18, 2023
-
We're renaming them from webvital_xxx_xxx_xxx to browser_web_vital_xxx. This change benefits us in three ways: 1. Browser metrics will be namespaced with browser_ 2. webvital is two words, so web vital 3. We're assuming that users will have the context of web vital metrics so that we can use the abbreviations which also helps with the display of them at the end of the test run. Closes: #884
Configuration menu - View commit details
-
Copy full SHA for 5e77e5d - Browse repository at this point
Copy the full SHA 5e77e5dView commit details -
This type will use env to retrieve the remote ws url details and whether one is supplied. It will store this data, which can then be retrieved when needed.
Configuration menu - View commit details
-
Copy full SHA for 646bec7 - Browse repository at this point
Copy the full SHA 646bec7View commit details -
Update the module with a remoteRegistry
Create a new instance of remoteRegistry which can be stored in the RootModule. This single instance of remoteRegistry can be set in all new ModuleInstances. Later on anything requiring the remoteRegistry should be able to access it to retrieve the remote ws url.
Configuration menu - View commit details
-
Copy full SHA for 803404b - Browse repository at this point
Copy the full SHA 803404bView commit details -
Update the mapping to work with remoteRegistry
Now that the remoteRegistry is part of the ModuleInstance, we can retrieve the parsed data from the env var and use it when setting up the mapping for the current vu.
Configuration menu - View commit details
-
Copy full SHA for b3b101f - Browse repository at this point
Copy the full SHA b3b101fView commit details
Commits on May 22, 2023
-
When K6_BROWSER_WS_URL is a comma separated list of ws urls, we need to pick from the list every time remoteRegistry.IsRemoteBrowser is called, not just once when remoteRegistry is created. This change moves the round robin (with the use of rand) to remoteRegistry.Is... ...RemoteBrowser from env.IsRemoteBrowser. env.IsRemoteBrowser now only collects and returns the list of ws urls.
Configuration menu - View commit details
-
Copy full SHA for a81d246 - Browse repository at this point
Copy the full SHA a81d246View commit details -
Refactor env to registry package
Env package now contains one type that is specific to the environment. The registry package contains changes which are specific to retrieving the remote ws urls. So this commit splits the two different concerns. A future commit with also move the remote registry specific logic from the browser package into the registry package.
Configuration menu - View commit details
-
Copy full SHA for 0a49751 - Browse repository at this point
Copy the full SHA 0a49751View commit details -
Move remote registry logic into remote package
To encapsulate the remote registry logic, we've moved the remote registry logic from the browser package into the remote package.
Configuration menu - View commit details
-
Copy full SHA for 670d249 - Browse repository at this point
Copy the full SHA 670d249View commit details -
Refactor pkg IsRemoteBrowser into New method
We no longer need to expose the pkg scoped IsRemoteBrowser since the only thing calling it is NewRemoteRegistry. The logic has been moved into NewRemoteRegistry.
Configuration menu - View commit details
-
Copy full SHA for df397e5 - Browse repository at this point
Copy the full SHA df397e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d87e37 - Browse repository at this point
Copy the full SHA 6d87e37View commit details