Unify analysis options (#108462)
This commit is contained in:
committed by
GitHub
parent
8a8ed75d3e
commit
10a7c9ba22
@@ -113,10 +113,11 @@ class ComplexLayoutState extends State<ComplexLayout> {
|
||||
key: const Key('complex-scroll'), // this key is used by the driver test
|
||||
controller: ScrollController(), // So that the scroll offset can be tracked
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
if (index.isEven)
|
||||
if (index.isEven) {
|
||||
return FancyImageItem(index, key: PageStorageKey<int>(index));
|
||||
else
|
||||
} else {
|
||||
return FancyGalleryItem(index, key: PageStorageKey<int>(index));
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -239,8 +239,9 @@ Map<String, dynamic> scrollSummary(
|
||||
//
|
||||
final double absJerk = (scrollOffset[i-1] + scrollOffset[i+1] - 2*scrollOffset[i]).abs();
|
||||
absJerkAvg += absJerk;
|
||||
if (absJerk > 0.5)
|
||||
if (absJerk > 0.5) {
|
||||
jankyCount += 1;
|
||||
}
|
||||
}
|
||||
// expect(lostFrame < 0.1 * frameTimestamp.length, true);
|
||||
absJerkAvg /= frameTimestamp.length - lostFrame;
|
||||
|
||||
@@ -18,8 +18,9 @@ void main() {
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null)
|
||||
if (driver != null) {
|
||||
driver.close();
|
||||
}
|
||||
});
|
||||
|
||||
Future<void> testScrollPerf(String listKey, String summaryName) async {
|
||||
|
||||
@@ -19,8 +19,9 @@ void main() {
|
||||
});
|
||||
|
||||
tearDownAll(() async {
|
||||
if (driver != null)
|
||||
if (driver != null) {
|
||||
driver.close();
|
||||
}
|
||||
});
|
||||
|
||||
test('initial tree creation', () async {
|
||||
@@ -34,8 +35,9 @@ void main() {
|
||||
});
|
||||
|
||||
final Iterable<TimelineEvent>? semanticsEvents = timeline.events?.where((TimelineEvent event) => event.name == 'SEMANTICS');
|
||||
if (semanticsEvents?.length != 2)
|
||||
if (semanticsEvents?.length != 2) {
|
||||
fail('Expected exactly two "SEMANTICS" events, got ${semanticsEvents?.length}:\n$semanticsEvents');
|
||||
}
|
||||
final Duration semanticsTreeCreation = Duration(microseconds: semanticsEvents!.last.timestampMicros! - semanticsEvents.first.timestampMicros!);
|
||||
|
||||
final String jsonEncoded = json.encode(<String, dynamic>{'initialSemanticsTreeCreation': semanticsTreeCreation.inMilliseconds});
|
||||
|
||||
Reference in New Issue
Block a user