-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Added new gallery benchmark test that forces opengles. #131796
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
Merged
gaaclarke
merged 4 commits into
flutter:master
from
gaaclarke:opengles-new-gallery-benchmark
Aug 3, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
81e0a1a
Added new gallery benchmark test that forces opengles.
gaaclarke 4eaf15b
flutter update-packages --force-upgrade
gaaclarke 76a9927
Made the manifest get reset
gaaclarke 300c785
Merge branch 'master' into opengles-new-gallery-benchmark
XilaiZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
dev/devicelab/bin/tasks/new_gallery_opengles_impeller__transition_perf.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // Copyright 2014 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| import 'dart:io'; | ||
|
|
||
| import 'package:flutter_devicelab/framework/devices.dart'; | ||
| import 'package:flutter_devicelab/framework/framework.dart'; | ||
| import 'package:flutter_devicelab/framework/utils.dart'; | ||
| import 'package:flutter_devicelab/tasks/new_gallery.dart'; | ||
| import 'package:path/path.dart' as path; | ||
|
|
||
| Future<void> main() async { | ||
| deviceOperatingSystem = DeviceOperatingSystem.android; | ||
|
|
||
| final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.'); | ||
| final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery')); | ||
|
|
||
| try { | ||
| await task(NewGalleryPerfTest(galleryDir, enableImpeller: true, forceOpenGLES: true).run); | ||
| } finally { | ||
| rmTree(galleryParentDir); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
This is probably overly paranoid, but I think restoring the file to its original contents in a
finally {}couldn't hurt.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.
If there is an error inside of
_addOpenGLESToManifestthere is no need to restore the file since the file is only edited in the last line.It looks like
writeAsStringSyncis not atomic so if writing somehow failed it could be garbage. But the cases where the writing fail would probably be an environment where the test wouldn't execute properly anyways, no?This test is modifying its own copy of the gallery in its own temporary directory so this shouldn't effect other tests, see https://github.com/flutter/flutter/pull/131796/files#diff-514ad19bc7a9b9e196b1568127fed85ee10552d62baa32f960d694a98cfc83f1R16.
Let me know if there is a situation I'm not considering.
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.
Like I said, I'm maybe being a bit paranoid, but suppose
_addOpenGLESToManifestis used by mistake for an some other integration test that lives influtter/flutter, and that the change to the xml file persists by mistake across multiple benchmark runs.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.
Okay, done.