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
4ce34f25
Unverified
Commit
4ce34f25
authored
Mar 10, 2020
by
Jonah Williams
Committed by
GitHub
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[benchmarks] remove archived build aot benchmarks (#52283)
parent
3191af13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
55 deletions
+0
-55
perf_tests.dart
dev/devicelab/lib/tasks/perf_tests.dart
+0
-55
No files found.
dev/devicelab/lib/tasks/perf_tests.dart
View file @
4ce34f25
...
...
@@ -362,7 +362,6 @@ class CompileTest {
await
flutter
(
'packages'
,
options:
<
String
>[
'get'
]);
final
Map
<
String
,
dynamic
>
metrics
=
<
String
,
dynamic
>{
...
await
_compileAot
(),
...
await
_compileApp
(
reportPackageContentSizes:
reportPackageContentSizes
),
...
await
_compileDebug
(),
};
...
...
@@ -371,43 +370,6 @@ class CompileTest {
});
}
static
Future
<
Map
<
String
,
dynamic
>>
_compileAot
()
async
{
await
flutter
(
'clean'
);
final
Stopwatch
watch
=
Stopwatch
()..
start
();
final
List
<
String
>
options
=
<
String
>[
'aot'
,
'-v'
,
'--extra-gen-snapshot-options=--print_snapshot_sizes'
,
'--release'
,
'--no-pub'
,
'--target-platform'
,
];
switch
(
deviceOperatingSystem
)
{
case
DeviceOperatingSystem
.
ios
:
options
.
add
(
'ios'
);
break
;
case
DeviceOperatingSystem
.
android
:
options
.
add
(
'android-arm'
);
break
;
case
DeviceOperatingSystem
.
fuchsia
:
throw
Exception
(
'Unsupported option for Fuchsia devices'
);
}
final
String
compileLog
=
await
evalFlutter
(
'build'
,
options:
options
);
watch
.
stop
();
final
RegExp
metricExpression
=
RegExp
(
r'([a-zA-Z]+)\(CodeSize\)\: (\d+)'
);
final
Map
<
String
,
dynamic
>
metrics
=
<
String
,
dynamic
>{};
for
(
final
Match
m
in
metricExpression
.
allMatches
(
compileLog
))
{
metrics
[
_sdkNameToMetricName
(
m
.
group
(
1
))]
=
int
.
parse
(
m
.
group
(
2
));
}
if
(
metrics
.
length
!=
_kSdkNameToMetricNameMapping
.
length
)
{
throw
'Expected metrics:
${_kSdkNameToMetricNameMapping.keys}
, but got:
${metrics.keys}
.'
;
}
metrics
[
'aot_snapshot_compile_millis'
]
=
watch
.
elapsedMilliseconds
;
return
metrics
;
}
static
Future
<
Map
<
String
,
dynamic
>>
_compileApp
({
bool
reportPackageContentSizes
=
false
})
async
{
await
flutter
(
'clean'
);
final
Stopwatch
watch
=
Stopwatch
();
...
...
@@ -485,22 +447,6 @@ class CompileTest {
};
}
static
const
Map
<
String
,
String
>
_kSdkNameToMetricNameMapping
=
<
String
,
String
>
{
'VMIsolate'
:
'aot_snapshot_size_vmisolate'
,
'Isolate'
:
'aot_snapshot_size_isolate'
,
'ReadOnlyData'
:
'aot_snapshot_size_rodata'
,
'Instructions'
:
'aot_snapshot_size_instructions'
,
'Total'
:
'aot_snapshot_size_total'
,
};
static
String
_sdkNameToMetricName
(
String
sdkName
)
{
if
(!
_kSdkNameToMetricNameMapping
.
containsKey
(
sdkName
))
throw
'Unrecognized SDK snapshot metric name:
$sdkName
'
;
return
_kSdkNameToMetricNameMapping
[
sdkName
];
}
static
Future
<
Map
<
String
,
dynamic
>>
getSizesFromIosApp
(
String
appPath
)
async
{
// Thin the binary to only contain one architecture.
final
String
xcodeBackend
=
path
.
join
(
flutterDirectory
.
path
,
'packages'
,
'flutter_tools'
,
'bin'
,
'xcode_backend.sh'
);
...
...
@@ -519,7 +465,6 @@ class CompileTest {
};
}
static
Future
<
Map
<
String
,
dynamic
>>
getSizesFromApk
(
String
apkPath
)
async
{
final
String
output
=
await
eval
(
'unzip'
,
<
String
>[
'-v'
,
apkPath
]);
final
List
<
String
>
lines
=
output
.
split
(
'
\n
'
);
...
...
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