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
4a7531da
Commit
4a7531da
authored
Nov 22, 2016
by
Chris Bracken
Committed by
GitHub
Nov 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use flutter_driver test outputs dir in Gallery test (#6988)
parent
c370b7de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
transitions_perf_test.dart
...es/flutter_gallery/test_driver/transitions_perf_test.dart
+5
-6
No files found.
examples/flutter_gallery/test_driver/transitions_perf_test.dart
View file @
4a7531da
...
...
@@ -60,7 +60,7 @@ final List<String> demoTitles = <String>[
final
FileSystem
_fs
=
new
LocalFileSystem
();
Future
<
Null
>
saveDurationsHistogram
(
List
<
Map
<
String
,
dynamic
>>
events
)
async
{
Future
<
Null
>
saveDurationsHistogram
(
List
<
Map
<
String
,
dynamic
>>
events
,
String
outputPath
)
async
{
final
Map
<
String
,
List
<
int
>>
durations
=
new
Map
<
String
,
List
<
int
>>();
Map
<
String
,
dynamic
>
startEvent
;
...
...
@@ -87,9 +87,7 @@ Future<Null> saveDurationsHistogram(List<Map<String, dynamic>> events) async {
}
// Save the durations Map to a file.
final
String
destinationDirectory
=
'build'
;
await
_fs
.
directory
(
destinationDirectory
).
create
(
recursive:
true
);
final
File
file
=
_fs
.
file
(
path
.
join
(
destinationDirectory
,
'transition_durations.timeline.json'
));
final
File
file
=
await
_fs
.
file
(
outputPath
).
create
(
recursive:
true
);
await
file
.
writeAsString
(
new
JsonEncoder
.
withIndent
(
' '
).
convert
(
durations
));
}
...
...
@@ -139,11 +137,12 @@ void main() {
TimelineSummary
summary
=
new
TimelineSummary
.
summarize
(
timeline
);
await
summary
.
writeSummaryToFile
(
'transitions'
,
pretty:
true
);
try
{
await
saveDurationsHistogram
(
timeline
.
json
[
'traceEvents'
]);
String
histogramPath
=
path
.
join
(
testOutputsDirectory
,
'transition_durations.timeline.json'
);
await
saveDurationsHistogram
(
timeline
.
json
[
'traceEvents'
],
histogramPath
);
}
catch
(
_
)
{
await
summary
.
writeTimelineToFile
(
'transitions'
,
pretty:
true
);
print
(
'ERROR: failed to extract transition events. Here is the full timeline:
\n
'
);
print
(
await
_fs
.
file
(
'
build
/transitions.timeline.json'
).
readAsString
());
print
(
await
_fs
.
file
(
'
$testOutputsDirectory
/transitions.timeline.json'
).
readAsString
());
rethrow
;
}
},
timeout:
new
Timeout
(
new
Duration
(
minutes:
5
)));
...
...
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