use speedometer-workloads #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP to show how workloads from another repository could get installed and used in Speedometer, with minimal changes.
Notes
Workloads install
Workloads are now installed through a (private) npm package. Currently, one single package is used for all workloads, instead of installing each workload separately. The Benefit of using a single package is simplicity. Downside is that we can’t decide in Speedometer, which version of a specific workload should be installed. This should be an easy step to change though.
speedometer-workloads
This package should be installed as a regular dependency of Speedometer.
speedometer-workloads repo: https://github.com/GoogleChromeLabs/speedometer-workloads
workloads.config.folder.json
This file determines which workload should get copied over from the @tkober/speedometer-workloads package.
{ "workloads": [ { "name": "charts-chartjs", "type":"static" } ] }copy-workloads
The copy-workloads script creates a workloads folder in the root of Speedometer with a copy of the dist folders of each work that is listed in the workloads.config.folder.json file.
Benchmark Runner
_prepareSuite
Multiple promises have to be resolved for this step:
_runAllSuites
Compared to the previous implementation, we are now only appending an iframe and creating a Page class instance, if a suite is not disabled.
Tests
Suites.push has been updated for each workload.
Example