forked from firka/flutter
benchmarkLive: a new LiveTestWidgetsFlutterBindingFramePolicy for benchmark on device (#61388)
* add benchmarkLive flag and tests * update handlePointerEventRecord doc * using e2e 0.6.1
This commit is contained in:
@@ -16,5 +16,6 @@ const String kFadingChildAnimationRouteName = '/fading_child_animation';
|
||||
const String kImageFilteredTransformAnimationRouteName = '/imagefiltered_transform_animation';
|
||||
const String kMultiWidgetConstructionRouteName = '/multi_widget_construction';
|
||||
const String kHeavyGridViewRouteName = '/heavy_gridview';
|
||||
const String kSimpleScrollRouteName = '/simple_scroll';
|
||||
|
||||
const String kScrollableName = '/macrobenchmark_listview';
|
||||
|
||||
@@ -17,6 +17,7 @@ import 'src/filtered_child_animation.dart';
|
||||
import 'src/multi_widget_construction.dart';
|
||||
import 'src/post_backdrop_filter.dart';
|
||||
import 'src/simple_animation.dart';
|
||||
import 'src/simple_scroll.dart';
|
||||
import 'src/text.dart';
|
||||
|
||||
const String kMacrobenchmarks = 'Macrobenchmarks';
|
||||
@@ -47,6 +48,7 @@ class MacrobenchmarksApp extends StatelessWidget {
|
||||
kImageFilteredTransformAnimationRouteName: (BuildContext context) => const FilteredChildAnimationPage(FilterType.rotateFilter),
|
||||
kMultiWidgetConstructionRouteName: (BuildContext context) => const MultiWidgetConstructTable(10, 20),
|
||||
kHeavyGridViewRouteName: (BuildContext context) => HeavyGridViewPage(),
|
||||
kSimpleScrollRouteName: (BuildContext context) => SimpleScroll(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
17
dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart
Normal file
17
dev/benchmarks/macrobenchmarks/lib/src/simple_scroll.dart
Normal file
@@ -0,0 +1,17 @@
|
||||
// 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 'package:flutter/material.dart';
|
||||
|
||||
class SimpleScroll extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView(
|
||||
children: <Widget>[
|
||||
for (int n = 0; n < 200; n += 1)
|
||||
Container(height: 40.0, child: Text('$n')),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user