Introduce image loading performance test. (#34823)
* Introduce image loading performance test. This example reports how long it takes to load images over the network(locally spawned server).
This commit is contained in:
committed by
GitHub
parent
25f31bf14a
commit
3badcf51a4
18
dev/devicelab/bin/tasks/image_list_reported_duration.dart
Normal file
18
dev/devicelab/bin/tasks/image_list_reported_duration.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright 2016 The Chromium 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:async';
|
||||
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(ReportedDurationTest(
|
||||
'${flutterDirectory.path}/examples/image_list',
|
||||
'lib/main.dart',
|
||||
'com.example.image_list',
|
||||
RegExp(r'===image_list=== all loaded in ([\d]+)ms.'),
|
||||
).run);
|
||||
}
|
||||
Reference in New Issue
Block a user