Skip to content
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

Remote Runner / PostMessge api #456

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

flashdesignory
Copy link
Contributor

@flashdesignory flashdesignory commented Nov 19, 2024

This pr introduces Remote Runner workloads.
Workloads that are local OR that point to a remote url (when running Speedometer locally), can communicate and run their own tests via PostMessage.

Basic flow:

  1. SuiteRunner loads the iframe of the local or remote workload.
  2. SuiteRunner waits for the "app-ready" message from the workload.
  3. Workload sends "app-ready" message, once its able to listen and receive a command to start the tests.
  4. SuiteRunner sends the "benchmark-suite" command to start the testing (with an optional suite name).
  5. Workload runs through the test suite and collects performance metrics.
  6. After each completed test step it sends a "step-complete" message, to update progress in speedometer.
  7. With the "suite-complete" message, the workload sends the metrics along.
  8. Speedometer receives metrics.

image

Notes

  • TestRunner and TestInvoker files are installed as dependencies in the news-site-next workload, to ensure they stay synced with updates.

window.version = "1.0.0";

/** **********************************************************************
* Params
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flashdesignory I don't see the following logic used in the main runner. Since it also reads params from the URL, would it be possible to share some code here instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've shared params.mjs in the other example 728aeab

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could - the params.mjs is slightly different, but I can take a look at both and see if I can clean up and reuse

@bgrins
Copy link
Contributor

bgrins commented Nov 21, 2024

Now that this has mostly incorporated #459 (I'd still like to see the params sharing) I think it's going to be easier to review & hopefully get landed for testing @rniwa @julienw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants