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
f1e7fe81
Unverified
Commit
f1e7fe81
authored
Sep 26, 2019
by
Jonah Williams
Committed by
GitHub
Sep 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Reland "Measure iOS CPU/GPU percentage (#39439)" (#41234)" (#41400)
parent
406b4498
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6 additions
and
143 deletions
+6
-143
common.dart
dev/benchmarks/macrobenchmarks/lib/common.dart
+0
-1
main.dart
dev/benchmarks/macrobenchmarks/lib/main.dart
+3
-12
backdrop_filter.dart
dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart
+0
-4
simple_animation.dart
dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart
+0
-12
simple_animation_perf.dart
...ks/macrobenchmarks/test_driver/simple_animation_perf.dart
+0
-11
simple_animation_perf_test.dart
...crobenchmarks/test_driver/simple_animation_perf_test.dart
+0
-14
backdrop_filter_perf_ios__timeline_summary.dart
...bin/tasks/backdrop_filter_perf_ios__timeline_summary.dart
+1
-1
simple_animation_perf_ios.dart
dev/devicelab/bin/tasks/simple_animation_perf_ios.dart
+0
-13
utils.dart
dev/devicelab/lib/framework/utils.dart
+0
-43
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+2
-26
manifest.yaml
dev/devicelab/manifest.yaml
+0
-6
No files found.
dev/benchmarks/macrobenchmarks/lib/common.dart
View file @
f1e7fe81
...
...
@@ -5,4 +5,3 @@
const
String
kCullOpacityRouteName
=
'/cull_opacity'
;
const
String
kCubicBezierRouteName
=
'/cubic_bezier'
;
const
String
kBackdropFilterRouteName
=
'/backdrop_filter'
;
const
String
kSimpleAnimationRouteName
=
'/simple_animation'
;
dev/benchmarks/macrobenchmarks/lib/main.dart
View file @
f1e7fe81
...
...
@@ -8,7 +8,6 @@ import 'common.dart';
import
'src/backdrop_filter.dart'
;
import
'src/cubic_bezier.dart'
;
import
'src/cull_opacity.dart'
;
import
'src/simple_animation.dart'
;
const
String
kMacrobenchmarks
=
'Macrobenchmarks'
;
...
...
@@ -25,7 +24,6 @@ class MacrobenchmarksApp extends StatelessWidget {
kCullOpacityRouteName:
(
BuildContext
context
)
=>
CullOpacityPage
(),
kCubicBezierRouteName:
(
BuildContext
context
)
=>
CubicBezierPage
(),
kBackdropFilterRouteName:
(
BuildContext
context
)
=>
BackdropFilterPage
(),
kSimpleAnimationRouteName:
(
BuildContext
conttext
)
=>
SimpleAnimationPage
(),
},
);
}
...
...
@@ -41,31 +39,24 @@ class HomePage extends StatelessWidget {
RaisedButton
(
key:
const
Key
(
kCullOpacityRouteName
),
child:
const
Text
(
'Cull opacity'
),
onPressed:
()
{
onPressed:
(){
Navigator
.
pushNamed
(
context
,
kCullOpacityRouteName
);
},
),
RaisedButton
(
key:
const
Key
(
kCubicBezierRouteName
),
child:
const
Text
(
'Cubic Bezier'
),
onPressed:
()
{
onPressed:
(){
Navigator
.
pushNamed
(
context
,
kCubicBezierRouteName
);
},
),
RaisedButton
(
key:
const
Key
(
kBackdropFilterRouteName
),
child:
const
Text
(
'Backdrop Filter'
),
onPressed:
()
{
onPressed:
(){
Navigator
.
pushNamed
(
context
,
kBackdropFilterRouteName
);
},
),
RaisedButton
(
key:
const
Key
(
kSimpleAnimationRouteName
),
child:
const
Text
(
'Simple Animation'
),
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
kSimpleAnimationRouteName
);
},
),
],
),
);
...
...
dev/benchmarks/macrobenchmarks/lib/src/backdrop_filter.dart
View file @
f1e7fe81
// Copyright 2019 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:ui'
;
import
'package:flutter/material.dart'
;
...
...
dev/benchmarks/macrobenchmarks/lib/src/simple_animation.dart
deleted
100644 → 0
View file @
406b4498
// Copyright 2019 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
'package:flutter/material.dart'
;
class
SimpleAnimationPage
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
const
Center
(
child:
LinearProgressIndicator
());
}
}
dev/benchmarks/macrobenchmarks/test_driver/simple_animation_perf.dart
deleted
100644 → 0
View file @
406b4498
// Copyright 2019 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
'package:flutter_driver/driver_extension.dart'
;
import
'package:macrobenchmarks/main.dart'
as
app
;
void
main
(
)
{
enableFlutterDriverExtension
();
app
.
main
();
}
dev/benchmarks/macrobenchmarks/test_driver/simple_animation_perf_test.dart
deleted
100644 → 0
View file @
406b4498
// Copyright 2019 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
'package:macrobenchmarks/common.dart'
;
import
'util.dart'
;
void
main
(
)
{
macroPerfTest
(
'simple_animation_perf'
,
kSimpleAnimationRouteName
,
);
}
dev/devicelab/bin/tasks/backdrop_filter_perf_ios__timeline_summary.dart
View file @
f1e7fe81
...
...
@@ -10,5 +10,5 @@ import 'package:flutter_devicelab/framework/framework.dart';
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
await
task
(
createBackdropFilterPerfTest
(
needsMeasureCpuGpu:
true
));
await
task
(
createBackdropFilterPerfTest
());
}
dev/devicelab/bin/tasks/simple_animation_perf_ios.dart
deleted
100644 → 0
View file @
406b4498
// Copyright 2019 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
'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
.
ios
;
await
task
(
createSimpleAnimationPerfTest
(
needsMeasureCpuGpu:
true
));
}
dev/devicelab/lib/framework/utils.dart
View file @
f1e7fe81
...
...
@@ -622,46 +622,3 @@ void checkFileExists(String file) {
throw
FileSystemException
(
'Expected file to exit.'
,
file
);
}
}
void
_checkExitCode
(
int
code
)
{
if
(
code
!=
0
)
{
throw
Exception
(
'Unexpected exit code =
$code
!'
,
);
}
}
Future
<
void
>
_execAndCheck
(
String
executable
,
List
<
String
>
args
)
async
{
_checkExitCode
(
await
exec
(
executable
,
args
));
}
// Measure the CPU/GPU percentage for [duration] while a Flutter app is running
// on an iOS device (e.g., right after a Flutter driver test has finished, which
// doesn't close the Flutter app, and the Flutter app has an indefinite
// animation). The return should have a format like the following json
// ```
// {"gpu_percentage":12.6,"cpu_percentage":18.15}
// ```
Future
<
Map
<
String
,
dynamic
>>
measureIosCpuGpu
({
Duration
duration
=
const
Duration
(
seconds:
10
),
String
deviceId
,
})
async
{
await
_execAndCheck
(
'pub'
,
<
String
>[
'global'
,
'activate'
,
'gauge'
,
'0.1.2'
,
]);
await
_execAndCheck
(
'pub'
,
<
String
>[
'global'
,
'run'
,
'gauge'
,
'ioscpugpu'
,
'new'
,
if
(
deviceId
!=
null
)
...<
String
>[
'-w'
,
deviceId
],
'-l'
,
'
${duration.inMilliseconds}
'
,
]);
return
json
.
decode
(
file
(
'
$cwd
/result.json'
).
readAsStringSync
());
}
dev/devicelab/lib/tasks/perf_tests.dart
View file @
f1e7fe81
...
...
@@ -54,21 +54,11 @@ TaskFunction createCubicBezierPerfTest() {
).
run
;
}
TaskFunction
createBackdropFilterPerfTest
(
{
bool
needsMeasureCpuGpu
=
false
}
)
{
TaskFunction
createBackdropFilterPerfTest
(
)
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/backdrop_filter_perf.dart'
,
'backdrop_filter_perf'
,
needsMeasureCpuGPu:
needsMeasureCpuGpu
,
).
run
;
}
TaskFunction
createSimpleAnimationPerfTest
(
{
bool
needsMeasureCpuGpu
=
false
})
{
return
PerfTest
(
'
${flutterDirectory.path}
/dev/benchmarks/macrobenchmarks'
,
'test_driver/simple_animation_perf.dart'
,
'simple_animation_perf'
,
needsMeasureCpuGPu:
needsMeasureCpuGpu
,
).
run
;
}
...
...
@@ -178,18 +168,12 @@ class StartupTest {
/// Measures application runtime performance, specifically per-frame
/// performance.
class
PerfTest
{
const
PerfTest
(
this
.
testDirectory
,
this
.
testTarget
,
this
.
timelineFileName
,
{
this
.
needsMeasureCpuGPu
=
false
});
const
PerfTest
(
this
.
testDirectory
,
this
.
testTarget
,
this
.
timelineFileName
);
final
String
testDirectory
;
final
String
testTarget
;
final
String
timelineFileName
;
final
bool
needsMeasureCpuGPu
;
Future
<
TaskResult
>
run
()
{
return
inDirectory
<
TaskResult
>(
testDirectory
,
()
async
{
final
Device
device
=
await
devices
.
workingDevice
;
...
...
@@ -218,12 +202,6 @@ class PerfTest {
);
}
if
(
needsMeasureCpuGPu
)
{
await
inDirectory
<
void
>(
'
$testDirectory
/build'
,
()
async
{
data
.
addAll
(
await
measureIosCpuGpu
(
deviceId:
deviceId
));
});
}
return
TaskResult
.
success
(
data
,
benchmarkScoreKeys:
<
String
>[
'average_frame_build_time_millis'
,
'worst_frame_build_time_millis'
,
...
...
@@ -235,8 +213,6 @@ class PerfTest {
'missed_frame_rasterizer_budget_count'
,
'90th_percentile_frame_rasterizer_time_millis'
,
'99th_percentile_frame_rasterizer_time_millis'
,
if
(
needsMeasureCpuGPu
)
'cpu_percentage'
,
if
(
needsMeasureCpuGPu
)
'gpu_percentage'
,
]);
});
}
...
...
dev/devicelab/manifest.yaml
View file @
f1e7fe81
...
...
@@ -535,12 +535,6 @@ tasks:
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
mac/ios"
]
simple_animation_perf_ios
:
description
:
>
Measure CPU/GPU usage percentages of a simple animation.
stage
:
devicelab_ios
required_agent_capabilities
:
[
"
mac/ios"
]
smoke_catalina_start_up_ios
:
description
:
>
A smoke test that runs on macOS Catalina, which is a clone of the Gallery startup latency test.
...
...
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