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
ba0321e9
Unverified
Commit
ba0321e9
authored
Oct 21, 2021
by
Ben Konyi
Committed by
GitHub
Oct 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reland "Enable caching of CPU samples collected at application startup (#89600)" (#92220)
This reverts commit
dc7fea8d
.
parent
c63c495f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
3 deletions
+15
-3
dds.dart
packages/flutter_tools/lib/src/base/dds.dart
+4
-0
fuchsia_device.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+1
-0
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+1
-0
attach_test.dart
...utter_tools/test/commands.shard/hermetic/attach_test.dart
+1
-0
drive_service_test.dart
...er_tools/test/general.shard/drive/drive_service_test.dart
+1
-0
fuchsia_device_test.dart
...tools/test/general.shard/fuchsia/fuchsia_device_test.dart
+1
-0
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+6
-3
No files found.
packages/flutter_tools/lib/src/base/dds.dart
View file @
ba0321e9
...
@@ -17,6 +17,7 @@ Future<dds.DartDevelopmentService> Function(
...
@@ -17,6 +17,7 @@ Future<dds.DartDevelopmentService> Function(
bool
enableAuthCodes
,
bool
enableAuthCodes
,
bool
ipv6
,
bool
ipv6
,
Uri
?
serviceUri
,
Uri
?
serviceUri
,
List
<
String
>
cachedUserTags
,
})
ddsLauncherCallback
=
dds
.
DartDevelopmentService
.
startDartDevelopmentService
;
})
ddsLauncherCallback
=
dds
.
DartDevelopmentService
.
startDartDevelopmentService
;
/// Helper class to launch a [dds.DartDevelopmentService]. Allows for us to
/// Helper class to launch a [dds.DartDevelopmentService]. Allows for us to
...
@@ -36,6 +37,7 @@ class DartDevelopmentService {
...
@@ -36,6 +37,7 @@ class DartDevelopmentService {
int
?
hostPort
,
int
?
hostPort
,
bool
?
ipv6
,
bool
?
ipv6
,
bool
?
disableServiceAuthCodes
,
bool
?
disableServiceAuthCodes
,
bool
cacheStartupProfile
=
false
,
})
async
{
})
async
{
final
Uri
ddsUri
=
Uri
(
final
Uri
ddsUri
=
Uri
(
scheme:
'http'
,
scheme:
'http'
,
...
@@ -52,6 +54,8 @@ class DartDevelopmentService {
...
@@ -52,6 +54,8 @@ class DartDevelopmentService {
serviceUri:
ddsUri
,
serviceUri:
ddsUri
,
enableAuthCodes:
disableServiceAuthCodes
!=
true
,
enableAuthCodes:
disableServiceAuthCodes
!=
true
,
ipv6:
ipv6
==
true
,
ipv6:
ipv6
==
true
,
// Enables caching of CPU samples collected during application startup.
cachedUserTags:
cacheStartupProfile
?
const
<
String
>[
'AppStartUp'
]
:
const
<
String
>[],
);
);
unawaited
(
_ddsInstance
?.
done
.
whenComplete
(()
{
unawaited
(
_ddsInstance
?.
done
.
whenComplete
(()
{
if
(!
_completer
.
isCompleted
)
{
if
(!
_completer
.
isCompleted
)
{
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
View file @
ba0321e9
...
@@ -70,6 +70,7 @@ Future<void> _kDefaultDartDevelopmentServiceStarter(
...
@@ -70,6 +70,7 @@ Future<void> _kDefaultDartDevelopmentServiceStarter(
ipv6:
true
,
ipv6:
true
,
disableServiceAuthCodes:
disableServiceAuthCodes
,
disableServiceAuthCodes:
disableServiceAuthCodes
,
logger:
globals
.
logger
,
logger:
globals
.
logger
,
cacheStartupProfile:
true
,
);
);
}
}
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
ba0321e9
...
@@ -267,6 +267,7 @@ class FlutterDevice {
...
@@ -267,6 +267,7 @@ class FlutterDevice {
ipv6:
ipv6
,
ipv6:
ipv6
,
disableServiceAuthCodes:
disableServiceAuthCodes
,
disableServiceAuthCodes:
disableServiceAuthCodes
,
logger:
globals
.
logger
,
logger:
globals
.
logger
,
cacheStartupProfile:
true
,
);
);
}
on
dds
.
DartDevelopmentServiceException
catch
(
e
,
st
)
{
}
on
dds
.
DartDevelopmentServiceException
catch
(
e
,
st
)
{
if
(!
allowExistingDdsInstance
||
if
(!
allowExistingDdsInstance
||
...
...
packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
View file @
ba0321e9
...
@@ -772,6 +772,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
...
@@ -772,6 +772,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
int
hostPort
,
int
hostPort
,
bool
ipv6
,
bool
ipv6
,
bool
disableServiceAuthCodes
,
bool
disableServiceAuthCodes
,
bool
cacheStartupProfile
=
false
,
})
async
{}
})
async
{}
@override
@override
...
...
packages/flutter_tools/test/general.shard/drive/drive_service_test.dart
View file @
ba0321e9
...
@@ -590,6 +590,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
...
@@ -590,6 +590,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
int
hostPort
,
int
hostPort
,
bool
ipv6
,
bool
ipv6
,
bool
disableServiceAuthCodes
,
bool
disableServiceAuthCodes
,
bool
cacheStartupProfile
=
false
,
})
async
{
})
async
{
started
=
true
;
started
=
true
;
}
}
...
...
packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
View file @
ba0321e9
...
@@ -932,6 +932,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
...
@@ -932,6 +932,7 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService
int
hostPort
,
int
hostPort
,
bool
ipv6
,
bool
ipv6
,
bool
disableServiceAuthCodes
,
bool
disableServiceAuthCodes
,
bool
cacheStartupProfile
=
false
,
})
async
{}
})
async
{}
@override
@override
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
ba0321e9
...
@@ -1809,11 +1809,12 @@ void main() {
...
@@ -1809,11 +1809,12 @@ void main() {
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
final
FakeDevice
device
=
FakeDevice
()
final
FakeDevice
device
=
FakeDevice
()
..
dds
=
DartDevelopmentService
();
..
dds
=
DartDevelopmentService
();
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
})
{
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
,
List
<
String
>
cachedUserTags
})
{
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
enableAuthCodes
,
isTrue
);
expect
(
enableAuthCodes
,
isTrue
);
expect
(
ipv6
,
isFalse
);
expect
(
ipv6
,
isFalse
);
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'127.0.0.1'
,
port:
0
));
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'127.0.0.1'
,
port:
0
));
expect
(
cachedUserTags
,
<
String
>[
'AppStartUp'
]);
throw
FakeDartDevelopmentServiceException
(
message:
throw
FakeDartDevelopmentServiceException
(
message:
'Existing VM service clients prevent DDS from taking control.'
,
'Existing VM service clients prevent DDS from taking control.'
,
);
);
...
@@ -1856,11 +1857,12 @@ void main() {
...
@@ -1856,11 +1857,12 @@ void main() {
final
FakeDevice
device
=
FakeDevice
()
final
FakeDevice
device
=
FakeDevice
()
..
dds
=
DartDevelopmentService
();
..
dds
=
DartDevelopmentService
();
final
Completer
<
void
>
done
=
Completer
<
void
>();
final
Completer
<
void
>
done
=
Completer
<
void
>();
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
})
async
{
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
,
List
<
String
>
cachedUserTags
})
async
{
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
enableAuthCodes
,
isFalse
);
expect
(
enableAuthCodes
,
isFalse
);
expect
(
ipv6
,
isTrue
);
expect
(
ipv6
,
isTrue
);
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'::1'
,
port:
0
));
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'::1'
,
port:
0
));
expect
(
cachedUserTags
,
<
String
>[
'AppStartUp'
]);
done
.
complete
();
done
.
complete
();
return
null
;
return
null
;
};
};
...
@@ -1887,11 +1889,12 @@ void main() {
...
@@ -1887,11 +1889,12 @@ void main() {
// See https://github.com/flutter/flutter/issues/72385 for context.
// See https://github.com/flutter/flutter/issues/72385 for context.
final
FakeDevice
device
=
FakeDevice
()
final
FakeDevice
device
=
FakeDevice
()
..
dds
=
DartDevelopmentService
();
..
dds
=
DartDevelopmentService
();
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
})
{
ddsLauncherCallback
=
(
Uri
uri
,
{
bool
enableAuthCodes
,
bool
ipv6
,
Uri
serviceUri
,
List
<
String
>
cachedUserTags
})
{
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
uri
,
Uri
(
scheme:
'foo'
,
host:
'bar'
));
expect
(
enableAuthCodes
,
isTrue
);
expect
(
enableAuthCodes
,
isTrue
);
expect
(
ipv6
,
isFalse
);
expect
(
ipv6
,
isFalse
);
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'127.0.0.1'
,
port:
0
));
expect
(
serviceUri
,
Uri
(
scheme:
'http'
,
host:
'127.0.0.1'
,
port:
0
));
expect
(
cachedUserTags
,
<
String
>[
'AppStartUp'
]);
throw
FakeDartDevelopmentServiceException
(
message:
'No URI'
);
throw
FakeDartDevelopmentServiceException
(
message:
'No URI'
);
};
};
final
TestFlutterDevice
flutterDevice
=
TestFlutterDevice
(
final
TestFlutterDevice
flutterDevice
=
TestFlutterDevice
(
...
...
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