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
5aa9a7fc
Commit
5aa9a7fc
authored
May 25, 2016
by
Jason Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forward the observatory (but not the diagnostic server) when in profile mode (#4183)
parent
604c75f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+21
-9
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
5aa9a7fc
...
...
@@ -294,20 +294,32 @@ class AndroidDevice extends Device {
printTrace
(
'Waiting for observatory port to be available...'
);
try
{
Future
<
List
<
int
>>
scrapeServicePorts
=
Future
.
wait
(
<
Future
<
int
>>[
observatoryDiscovery
.
nextPort
(),
diagnosticDiscovery
.
nextPort
()]
);
List
<
int
>
devicePorts
=
await
scrapeServicePorts
.
timeout
(
new
Duration
(
seconds:
20
));
int
observatoryDevicePort
=
devicePorts
[
0
];
int
observatoryDevicePort
,
diagnosticDevicePort
;
if
(
options
.
buildMode
==
BuildMode
.
debug
)
{
Future
<
List
<
int
>>
scrapeServicePorts
=
Future
.
wait
(
<
Future
<
int
>>[
observatoryDiscovery
.
nextPort
(),
diagnosticDiscovery
.
nextPort
()]
);
List
<
int
>
devicePorts
=
await
scrapeServicePorts
.
timeout
(
new
Duration
(
seconds:
20
));
observatoryDevicePort
=
devicePorts
[
0
];
diagnosticDevicePort
=
devicePorts
[
1
];
}
else
{
observatoryDevicePort
=
await
observatoryDiscovery
.
nextPort
().
timeout
(
new
Duration
(
seconds:
20
));
}
printTrace
(
'observatory port =
$observatoryDevicePort
'
);
int
observatoryLocalPort
=
await
options
.
findBestObservatoryPort
();
// TODO(devoncarew): Remember the forwarding information (so we can later remove the
// port forwarding).
await
_forwardPort
(
ProtocolDiscovery
.
kObservatoryService
,
observatoryDevicePort
,
observatoryLocalPort
);
int
diagnosticDevicePort
=
devicePorts
[
1
];
printTrace
(
'diagnostic port =
$diagnosticDevicePort
'
);
int
diagnosticLocalPort
=
await
options
.
findBestDiagnosticPort
();
await
_forwardPort
(
ProtocolDiscovery
.
kDiagnosticService
,
diagnosticDevicePort
,
diagnosticLocalPort
);
int
diagnosticLocalPort
;
if
(
diagnosticDevicePort
!=
null
)
{
printTrace
(
'diagnostic port =
$diagnosticDevicePort
'
);
diagnosticLocalPort
=
await
options
.
findBestDiagnosticPort
();
await
_forwardPort
(
ProtocolDiscovery
.
kDiagnosticService
,
diagnosticDevicePort
,
diagnosticLocalPort
);
}
return
new
LaunchResult
.
succeeded
(
observatoryPort:
observatoryLocalPort
,
diagnosticPort:
diagnosticLocalPort
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
5aa9a7fc
...
...
@@ -101,7 +101,7 @@ class RunCommand extends RunCommandBase {
DebuggingOptions
options
;
if
(
getBuildMode
()
!=
BuildMode
.
debug
)
{
if
(
getBuildMode
()
==
BuildMode
.
release
)
{
options
=
new
DebuggingOptions
.
disabled
(
getBuildMode
());
}
else
{
options
=
new
DebuggingOptions
.
enabled
(
...
...
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