Skip to content

[WIP] Migrate Gallery benchmarks out of flutter/flutter (flutter side) #66351

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

Closed
wants to merge 35 commits into from

Conversation

pennzht
Copy link
Member

@pennzht pennzht commented Sep 22, 2020

Working in progress. Do not review yet.

Description

This PR moves Gallery web benchmarks out of Flutter proper and separates the dependencies for flutter/flutter and flutter/gallery, allowing the two repos to freely update dependencies in the future, while preserving the important benchmarks which give us tons of useful signals, not just performance, but stability also.

These three PRs (see References section below) behave in the following way:

  1. web_benchmarks side — Creates the web_benchmarks package, the common package used by both non-Gallery web benchmarks and Gallery web benchmarks.
    • Once this PR is approved, we create a package (possibly publishing to pub.dev) and redirect all imports to that package.
  2. gallery side — Adds Gallery benchmarks (browser side) to the flutter/gallery.
  3. flutter side — Rewrite Gallery benchmarks in flutter/flutter to stop using pubspec.yaml dependencies, and start pulling flutter/gallery at runtime.

The three PRs must be landed in this order.

Currently, some dependencies / git references are pointing to my own branches. They will be moved to official branches once the corresponding prerequisites are landed.

References

web_benchmarks side — pennzht/web_benchmarks#1
gallery side — flutter/gallery#321
flutter side — #66351

Related Issues

Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR. There should be at least one issue listed here.

Tests

No tests are added here.
Tests are added for the web_benchmarks package.

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Sep 22, 2020
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@pennzht pennzht changed the title [WIP] Migrate Gallery benchmarks out of flutter/flutter. [WIP] Migrate Gallery benchmarks out of flutter/flutter (flutter side) Sep 22, 2020
@pennzht pennzht marked this pull request as draft September 23, 2020 08:28
@flutter-dashboard
Copy link

This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again.

web_benchmarks:
git:
url: https://github.com/pennzht/web_benchmarks.git
ref: 40a483181861e6cd84dd14a6d31cb45a966f8d59
Copy link
Contributor

Choose a reason for hiding this comment

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

In order to fix the issue in question this will become a normal pub dependency, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this will become something like web_benchmarks: <version> similar to animations: 1.1.2 below, once the pub package is published.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect!

return galleryBenchmarkResult;
}

// Both succeeded. Combine data.
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of making this a method on the TaskResult class? Something like this:

class TaskResult {
  TaskResult combine(TaskResult other) {
    ...
  }
}

The combine method could internally decide whether the overall result is a success or not, and it could validate that there's no overlap in data (e.g. that the benchmark score keys are unique).

@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • Please get at least one approved review before re-applying this label. Reviewers: If you left a comment approving, please use the "approve" review action instead.
  • The status or check suite Linux analyze has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite Mac customer_testing has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite analyze-linux has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite deploy_gallery-linux has failed. Please fix the issues identified (or deflake) before re-applying this label.
  • The status or check suite deploy_gallery-macos has failed. Please fix the issues identified (or deflake) before re-applying this label.

@goderbauer
Copy link
Member

Are there still plans for this or should we close it?

@Hixie Hixie closed this Nov 17, 2021
@Hixie
Copy link
Contributor

Hixie commented Nov 17, 2021

Since there has been no progress here for a few weeks and the PR is marked "draft", I'm going to close the PR for now. Please do not hesitate to create a new PR when this is ready to land! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: contributor-productivity Team-specific productivity, code health, technical debt. f: material design flutter/packages/flutter/material repository.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants