-
Notifications
You must be signed in to change notification settings - Fork 75
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
Remote Runner / PostMessge api #456
Conversation
Still looking good from my side. |
* | ||
* A collection of test suites for a single workload. | ||
*/ | ||
export class BenchmarkSuitesManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this? It doesn't seem like we're gonna have more than one suite per document?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a reason for this.
Each workload has a 'default' suite, the one that runs by default in Speedometer.
This setup allows for one workload to have multiple suites. one default and let's say an experimental one.
It lets us reuse the same workload, with different suites to run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed, using a 'suites' object now.
import { HashRouter as Router, Routes, Route } from "react-router-dom"; | ||
import Page from "@/partials/page/page"; | ||
import Head from "next/head"; | ||
import { DataContextProvider } from "@/context/data-context"; | ||
import { connectToBenchmark } from "speedometer-utils/workload-testing-utils.mjs"; | ||
import { getBenchmarkSuitesManager } from "@/workload-test.mjs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a bunch of tests are all going to have their own getBenchmarkSuitesManager?
That would make grep'ing harder. Why not name this after each suite?
e.g. import { NewsNextSuite } from "@/workload-test.mjs";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A workload can have multiple suites, but we could name it after the workload.
What's the benefit of renaming it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the mentioned suites object, which is exported as default, we could easily rename the import if that's desired.
|
||
async runAndRecord(params, suite, test, callback) { | ||
const testRunner = new TestRunner(null, null, params, suite, test, callback); | ||
const result = await testRunner.runTest(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an explicit await here? Can't we just return the result of testRunner.runTest()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, since the RAFTestInvoker has this line:
const result = await this._reportCallback();
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:
Notes