blink-ai: Deduplicate story create options

Every entry in STORIES declared getCreateOptions() as a method that
returns a static object literal, there's duplicate story create options
because the same option shapes were repeated across entries:
- { samplingMode: 'most-predictable' } appeared three times
- { expectedInputs: [{ type: 'image' }] } appeared twice

Extracts the shared shapes into named constants and adds a defineStory()
factory, so each story is declared in one or two lines.

No behavior change.

Bug: 557379053, 562128967
Tested: Verified locally on dev server.
Change-Id: I818cca2322ad0179f6515a9e2f1833bb88f4a1e8
Reviewed-on: https://chromium-review.googlesource.com/c/web-workload/+/8395637
Reviewed-by: Nathan Memmott <memmott@chromium.org>
Reviewed-by: Devin Cabillo <devincabillo@google.com>
1 file changed
tree: de702afcfc1b179c6931d530ad472a86b9b8c890
  1. help/
  2. public/
  3. .firebaserc
  4. .gitignore
  5. .gitmodules
  6. .style.yapf
  7. .vpython3
  8. build.py
  9. deploy-main.sh
  10. deploy-subdomains.sh
  11. DEPS
  12. firebase.json
  13. LICENSE
  14. README.md
  15. setup.sh
  16. stage-main.sh
  17. test-deployment.py
README.md

Chromium Workloads

This is the source for the chromium workloads page. We keep copies and versions of common press benchmarks and other statically hosted workloads here.

Workloads might have custom licenses that can be found in their respective folders.

It consist of 3 parts:

  • The workloads.json description file with all workloads.
  • Workloads (e.g. existing press benchmarks) in the public folder.
  • The html / javascript code to display the data from workloads.json.

Workloads

If possible workloads are DEPS-rolled from single-version branches. on forked repositories on https://chromium.googlesource.com.

LICENSEs are part of the respective workloads or workload versions.

Sources

Setup ⚒️

mkdir web-workload && cd web-workload;

# Checkout using depot_tools's fetch command:
fetch web-workload;
cd web-workload

# Setup firebase login:
# - Install the firebase cl: https://firebase.google.com/docs/cli#install_the_firebase_cli
# - Setup firebase:
./setup.sh

Deployment 🚀

chromium-workloads is hosted on firebase.

  • Use stage-main.sh to stage a testing version for the main page on temporary domain (can be used for testing freely)

Danger Zone 😱

Update and Redeployment

  • git pull
  • gclient sync
  • Testing:
    • ./stage-main.sh
    • Quickly manually very that main page and benchmark versions load correctly.
    • Run the latest tracked benchmark versions.
  • Deployment:
    • Deploy using ./deploy-main.sh
    • Also deploy the subdomain hosting ./deploy-subdomains.sh

Emergency Rollback 😰

In case of a broken deployment we can manually restore an old version via the firebase console. firebase console

  • Open the firebase console
  • Open “Hosting”
  • “View” main “chromium-workloads” site
  • “Restore” one of the “Previous releases”