Unverified Commit 54a9d652 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

Revert "Reland "Enable caching of CPU samples collected at application startup (#89600)"" (#98803)

parent c849844f
...@@ -17,7 +17,6 @@ Future<dds.DartDevelopmentService> Function( ...@@ -17,7 +17,6 @@ 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
...@@ -37,7 +36,6 @@ class DartDevelopmentService { ...@@ -37,7 +36,6 @@ 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',
...@@ -54,8 +52,6 @@ class DartDevelopmentService { ...@@ -54,8 +52,6 @@ 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) {
......
...@@ -63,7 +63,6 @@ Future<void> _kDefaultDartDevelopmentServiceStarter( ...@@ -63,7 +63,6 @@ Future<void> _kDefaultDartDevelopmentServiceStarter(
ipv6: true, ipv6: true,
disableServiceAuthCodes: disableServiceAuthCodes, disableServiceAuthCodes: disableServiceAuthCodes,
logger: globals.logger, logger: globals.logger,
cacheStartupProfile: true,
); );
} }
......
...@@ -267,7 +267,6 @@ class FlutterDevice { ...@@ -267,7 +267,6 @@ 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 ||
......
...@@ -798,7 +798,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService ...@@ -798,7 +798,6 @@ 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
......
...@@ -590,7 +590,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService ...@@ -590,7 +590,6 @@ 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;
} }
......
...@@ -944,7 +944,6 @@ class FakeDartDevelopmentService extends Fake implements DartDevelopmentService ...@@ -944,7 +944,6 @@ 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
......
...@@ -1892,12 +1892,11 @@ flutter: ...@@ -1892,12 +1892,11 @@ flutter:
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, List<String> cachedUserTags}) { ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) {
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.',
); );
...@@ -1940,12 +1939,11 @@ flutter: ...@@ -1940,12 +1939,11 @@ flutter:
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, List<String> cachedUserTags}) async { ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) 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;
}; };
...@@ -1972,12 +1970,11 @@ flutter: ...@@ -1972,12 +1970,11 @@ flutter:
// 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, List<String> cachedUserTags}) { ddsLauncherCallback = (Uri uri, {bool enableAuthCodes, bool ipv6, Uri serviceUri}) {
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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment