Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
e4fbb1ab
Unverified
Commit
e4fbb1ab
authored
Feb 18, 2020
by
Dan Field
Committed by
GitHub
Feb 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Animated placeholder perf (#50851)
parent
67362ce5
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1317 additions
and
1 deletion
+1317
-1
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+1
-0
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+10
-1
animated_placeholder.dart
...chmarks/macrobenchmarks/lib/src/animated_placeholder.dart
+68
-0
.gitignore
dev/benchmarks/macrobenchmarks/macos/.gitignore
+6
-0
project.pbxproj
...ks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj
+591
-0
contents.xcworkspacedata
...er.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
Runner.xcscheme
...s/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+101
-0
contents.xcworkspacedata
...chmarks/macos/Runner.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
.../Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
AppDelegate.swift
...benchmarks/macrobenchmarks/macos/Runner/AppDelegate.swift
+13
-0
MainMenu.xib
...arks/macrobenchmarks/macos/Runner/Base.lproj/MainMenu.xib
+339
-0
AppInfo.xcconfig
...rks/macrobenchmarks/macos/Runner/Configs/AppInfo.xcconfig
+14
-0
Debug.xcconfig
...marks/macrobenchmarks/macos/Runner/Configs/Debug.xcconfig
+2
-0
Release.xcconfig
...rks/macrobenchmarks/macos/Runner/Configs/Release.xcconfig
+2
-0
Warnings.xcconfig
...ks/macrobenchmarks/macos/Runner/Configs/Warnings.xcconfig
+13
-0
DebugProfile.entitlements
...ks/macrobenchmarks/macos/Runner/DebugProfile.entitlements
+12
-0
Info.plist
dev/benchmarks/macrobenchmarks/macos/Runner/Info.plist
+32
-0
MainFlutterWindow.swift
...arks/macrobenchmarks/macos/Runner/MainFlutterWindow.swift
+19
-0
Release.entitlements
...chmarks/macrobenchmarks/macos/Runner/Release.entitlements
+8
-0
animated_placeholder_perf.dart
...acrobenchmarks/test_driver/animated_placeholder_perf.dart
+11
-0
animated_placeholder_perf_test.dart
...enchmarks/test_driver/animated_placeholder_perf_test.dart
+16
-0
animated_placeholder_perf.dart
dev/devicelab/bin/tasks/animated_placeholder_perf.dart
+12
-0
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+9
-0
manifest.yaml
dev/devicelab/manifest.yaml
+8
-0
No files found.
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
e4fbb1ab
...
...
@@ -10,3 +10,4 @@ const String kSimpleAnimationRouteName = '/simple_animation';
const
String
kPictureCacheRouteName
=
'/picture_cache'
;
const
String
kLargeImagesRouteName
=
'/large_images'
;
const
String
kTextRouteName
=
'/text'
;
const
String
kAnimatedPlaceholderRouteName
=
'/animated_placeholder'
;
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
e4fbb1ab
...
...
@@ -7,6 +7,7 @@ import 'package:macrobenchmarks/src/large_images.dart';
import
'package:macrobenchmarks/src/picture_cache.dart'
;
import
'common.dart'
;
import
'src/animated_placeholder.dart'
;
import
'src/backdrop_filter.dart'
;
import
'src/cubic_bezier.dart'
;
import
'src/cull_opacity.dart'
;
...
...
@@ -14,7 +15,7 @@ import 'src/post_backdrop_filter.dart';
import
'src/simple_animation.dart'
;
import
'src/text.dart'
;
const
String
kMacrobenchmarks
=
'Macrobenchmarks'
;
const
String
kMacrobenchmarks
=
'Macrobenchmarks'
;
void
main
(
)
=>
runApp
(
const
MacrobenchmarksApp
());
...
...
@@ -36,6 +37,7 @@ class MacrobenchmarksApp extends StatelessWidget {
kPictureCacheRouteName:
(
BuildContext
context
)
=>
PictureCachePage
(),
kLargeImagesRouteName:
(
BuildContext
context
)
=>
LargeImagesPage
(),
kTextRouteName:
(
BuildContext
context
)
=>
TextPage
(),
kAnimatedPlaceholderRouteName:
(
BuildContext
context
)
=>
AnimatedPlaceholderPage
(),
},
);
}
...
...
@@ -106,6 +108,13 @@ class HomePage extends StatelessWidget {
Navigator
.
pushNamed
(
context
,
kTextRouteName
);
},
),
RaisedButton
(
key:
const
Key
(
kAnimatedPlaceholderRouteName
),
child:
const
Text
(
'Animated Placeholder'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kAnimatedPlaceholderRouteName
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/animated_placeholder.dart
0 → 100644
View file @
e4fbb1ab
// 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:async'
;
import
'dart:convert'
;
import
'dart:ui'
as
ui
show
Codec
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/material.dart'
;
/// An animated GIF image with 3 1x1 pixel frames (a red, green, and blue
/// frames). The GIF animates forever, and each frame has a 100ms delay.
const
String
kAnimatedGif
=
'R0lGODlhAQABAKEDAAAA//8AAAD/AP///yH/C05FVFNDQVBFMi'
'4wAwEAAAAh+QQACgD/ACwAAAAAAQABAAACAkwBACH5BAAKAP8A'
'LAAAAAABAAEAAAICVAEAIfkEAAoA/wAsAAAAAAEAAQAAAgJEAQ'
'A7'
;
/// A 50x50 blue square png
const
String
kBlueSquare
=
'iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAASEl'
'EQVR42u3PMQ0AMAgAsGFjL/4tYQU08JLWQSN/9TsgRERERERERE'
'REREREREREREREREREREREREREREREREREREREREQ2BgNuaUcSj'
'uqqAAAAAElFTkSuQmCC'
;
/// A 10x10 grid of animated looping placeholder gifts that fade into a
/// blue square.
class
AnimatedPlaceholderPage
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
GridView
.
builder
(
itemCount:
100
,
gridDelegate:
const
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
10
),
itemBuilder:
(
BuildContext
context
,
int
index
)
{
return
FadeInImage
(
placeholder:
DelayedBase64Image
(
Duration
.
zero
,
kAnimatedGif
),
image:
DelayedBase64Image
(
Duration
(
milliseconds:
100
*
index
),
kBlueSquare
),
);
},
);
}
}
int
_key
=
0
;
/// An image provider that is always unique from other DelayedBase64Images and
/// simulates a delay in loading.
class
DelayedBase64Image
extends
ImageProvider
<
int
>
{
const
DelayedBase64Image
(
this
.
delay
,
this
.
data
);
final
String
data
;
final
Duration
delay
;
@override
Future
<
int
>
obtainKey
(
ImageConfiguration
configuration
)
{
return
SynchronousFuture
<
int
>(
_key
++);
}
@override
ImageStreamCompleter
load
(
int
key
,
DecoderCallback
decode
)
{
return
MultiFrameImageStreamCompleter
(
codec:
Future
<
ui
.
Codec
>.
delayed
(
delay
,
()
=>
decode
(
base64
.
decode
(
data
)),
),
scale:
1.0
,
);
}
}
dev/benchmarks/macrobenchmarks/macos/.gitignore
0 → 100644
View file @
e4fbb1ab
# Flutter-related
**/Flutter/ephemeral/
**/Pods/
# Xcode-related
**/xcuserdata/
dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj
0 → 100644
View file @
e4fbb1ab
This diff is collapsed.
Click to expand it.
dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
e4fbb1ab
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:/Users/stuartmorgan/src/embedder-opensource/flutter-desktop-embedding/example/macos/Runner.xcodeproj"
>
</FileRef>
</Workspace>
dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
e4fbb1ab
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
0 → 100644
View file @
e4fbb1ab
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion =
"1000"
version =
"1.3"
>
<BuildAction
parallelizeBuildables =
"YES"
buildImplicitDependencies =
"YES"
>
<BuildActionEntries>
<BuildActionEntry
buildForTesting =
"YES"
buildForRunning =
"YES"
buildForProfiling =
"YES"
buildForArchiving =
"YES"
buildForAnalyzing =
"YES"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"macrobenchmarks.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv =
"YES"
>
<Testables>
<TestableReference
skipped =
"NO"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"00380F9121DF178D00097171"
BuildableName =
"RunnerUITests.xctest"
BlueprintName =
"RunnerUITests"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"macrobenchmarks.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration =
"Debug"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle =
"0"
useCustomWorkingDirectory =
"NO"
ignoresPersistentStateOnLaunch =
"NO"
debugDocumentVersioning =
"YES"
debugServiceExtension =
"internal"
allowLocationSimulation =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"macrobenchmarks.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration =
"Release"
shouldUseLaunchSchemeArgsEnv =
"YES"
savedToolIdentifier =
""
useCustomWorkingDirectory =
"NO"
debugDocumentVersioning =
"YES"
>
<BuildableProductRunnable
runnableDebuggingMode =
"0"
>
<BuildableReference
BuildableIdentifier =
"primary"
BlueprintIdentifier =
"33CC10EC2044A3C60003C045"
BuildableName =
"macrobenchmarks.app"
BlueprintName =
"Runner"
ReferencedContainer =
"container:Runner.xcodeproj"
>
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration =
"Debug"
>
</AnalyzeAction>
<ArchiveAction
buildConfiguration =
"Release"
revealArchiveInOrganizer =
"YES"
>
</ArchiveAction>
</Scheme>
dev/benchmarks/macrobenchmarks/macos/Runner.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
e4fbb1ab
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"group:Runner.xcodeproj"
>
</FileRef>
</Workspace>
dev/benchmarks/macrobenchmarks/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
e4fbb1ab
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
dev/benchmarks/macrobenchmarks/macos/Runner/AppDelegate.swift
0 → 100644
View file @
e4fbb1ab
// 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
Cocoa
import
FlutterMacOS
@NSApplicationMain
class
AppDelegate
:
FlutterAppDelegate
{
override
func
applicationShouldTerminateAfterLastWindowClosed
(
_
sender
:
NSApplication
)
->
Bool
{
return
true
}
}
dev/benchmarks/macrobenchmarks/macos/Runner/Base.lproj/MainMenu.xib
0 → 100644
View file @
e4fbb1ab
This diff is collapsed.
Click to expand it.
dev/benchmarks/macrobenchmarks/macos/Runner/Configs/AppInfo.xcconfig
0 → 100644
View file @
e4fbb1ab
// Application-level settings for the Runner target.
//
// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
// future. If not, the values below would default to using the project name when this becomes a
// 'flutter create' template.
// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = macrobenchmarks
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.macrobenchmarks
// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved.
dev/benchmarks/macrobenchmarks/macos/Runner/Configs/Debug.xcconfig
0 → 100644
View file @
e4fbb1ab
#include "../../Flutter/Flutter-Debug.xcconfig"
#include "Warnings.xcconfig"
dev/benchmarks/macrobenchmarks/macos/Runner/Configs/Release.xcconfig
0 → 100644
View file @
e4fbb1ab
#include "../../Flutter/Flutter-Release.xcconfig"
#include "Warnings.xcconfig"
dev/benchmarks/macrobenchmarks/macos/Runner/Configs/Warnings.xcconfig
0 → 100644
View file @
e4fbb1ab
WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_PRAGMA_PACK = YES
CLANG_WARN_STRICT_PROTOTYPES = YES
CLANG_WARN_COMMA = YES
GCC_WARN_STRICT_SELECTOR_MATCH = YES
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
GCC_WARN_SHADOW = YES
CLANG_WARN_UNREACHABLE_CODE = YES
dev/benchmarks/macrobenchmarks/macos/Runner/DebugProfile.entitlements
0 → 100644
View file @
e4fbb1ab
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
com.apple.security.app-sandbox
</key>
<true/>
<key>
com.apple.security.cs.allow-jit
</key>
<true/>
<key>
com.apple.security.network.server
</key>
<true/>
</dict>
</plist>
dev/benchmarks/macrobenchmarks/macos/Runner/Info.plist
0 → 100644
View file @
e4fbb1ab
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
$
(
DEVELOPMENT_LANGUAGE
)<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIconFile
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
$
(
FLUTTER_BUILD_NAME
)<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
$
(
FLUTTER_BUILD_NUMBER
)<
/string
>
<
k
e
y
>
LSMinimumSystemVersion
<
/k
e
y
>
<
string
>
$
(
MACOSX_DEPLOYMENT_TARGET
)<
/string
>
<
k
e
y
>
NSHumanReadableCopyright
<
/k
e
y
>
<
string
>
$
(
PRODUCT_COPYRIGHT
)<
/string
>
<
k
e
y
>
NSMainNibFile
<
/k
e
y
>
<
string
>
MainMenu
<
/string
>
<
k
e
y
>
NSPrincipalClass
<
/k
e
y
>
<
string
>
NSApplication
<
/string
>
<
/
d
i
c
t
>
<
/plist
>
dev/benchmarks/macrobenchmarks/macos/Runner/MainFlutterWindow.swift
0 → 100644
View file @
e4fbb1ab
// 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
Cocoa
import
FlutterMacOS
class
MainFlutterWindow
:
NSWindow
{
override
func
awakeFromNib
()
{
let
flutterViewController
=
FlutterViewController
.
init
()
let
windowFrame
=
self
.
frame
self
.
contentViewController
=
flutterViewController
self
.
setFrame
(
windowFrame
,
display
:
true
)
RegisterGeneratedPlugins
(
registry
:
flutterViewController
)
super
.
awakeFromNib
()
}
}
dev/benchmarks/macrobenchmarks/macos/Runner/Release.entitlements
0 → 100644
View file @
e4fbb1ab
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
com.apple.security.app-sandbox
</key>
<true/>
</dict>
</plist>
dev/benchmarks/macrobenchmarks/test_driver/animated_placeholder_perf.dart
0 → 100644
View file @
e4fbb1ab
// 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_driver/driver_extension.dart'
;
import
'package:macrobenchmarks/main.dart'
as
app
;
void
main
(
)
{
enableFlutterDriverExtension
();
app
.
main
();
}
dev/benchmarks/macrobenchmarks/test_driver/animated_placeholder_perf_test.dart
0 → 100644
View file @
e4fbb1ab
// 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:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTest
(
'animated_placeholder_perf'
,
kAnimatedPlaceholderRouteName
,
pageDelay:
const
Duration
(
seconds:
1
),
duration:
const
Duration
(
seconds:
15
),
);
}
dev/devicelab/bin/tasks/animated_placeholder_perf.dart
0 → 100644
View file @
e4fbb1ab
// 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_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/tasks/perf_tests.dart'
;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
await
task
(
createAnimatedPlaceholderPerfTest
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
e4fbb1ab
...
...
@@ -81,6 +81,15 @@ TaskFunction createSimpleAnimationPerfTest({bool needsMeasureCpuGpu = false}) {
).
run
;
}
TaskFunction
createAnimatedPlaceholderPerfTest
(
{
bool
needsMeasureCpuGpu
=
false
})
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/animated_placeholder_perf.dart'
,
'animated_placeholder_perf'
,
needsMeasureCpuGPu:
needsMeasureCpuGpu
,
).
run
;
}
TaskFunction
createPictureCachePerfTest
(
)
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
...
...
dev/devicelab/manifest.yaml
View file @
e4fbb1ab
...
...
@@ -700,6 +700,14 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
mac/android"
]
animated_placeholder_perf
:
description
:
>
Measures frame build and rasterizer times, as well as frame build counts
for a grid of images that uses FadeInImage with an animated gif as the
placeholder.
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
analyzer_benchmark
:
description
:
>
Measures the speed of Dart analyzer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment