Reland "Remove references to Observatory (#118577)" (#121606)

This reverts commit 275ab9c69b.
This commit is contained in:
Ben Konyi
2023-02-28 11:57:04 -05:00
committed by GitHub
parent 8fc499aaf0
commit ecd7518df5
90 changed files with 519 additions and 491 deletions

View File

@@ -202,7 +202,7 @@ Future<TaskResult> runTask(
.transform<String>(const LineSplitter())
.listen((String line) {
if (!uri.isCompleted) {
final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('(Observatory|The Dart VM service is) listening on '));
final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('The Dart VM service is listening on '));
if (serviceUri != null) {
uri.complete(serviceUri);
}

View File

@@ -664,14 +664,14 @@ Future<void> runAndCaptureAsyncStacks(Future<void> Function() callback) {
bool canRun(String path) => _processManager.canRun(path);
final RegExp _obsRegExp =
RegExp('An Observatory debugger .* is available at: ');
RegExp('A Dart VM Service .* is available at: ');
final RegExp _obsPortRegExp = RegExp(r'(\S+:(\d+)/\S*)$');
final RegExp _obsUriRegExp = RegExp(r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
/// Tries to extract a port from the string.
///
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
int? parseServicePort(String line, {
Pattern? prefix,
}) {
@@ -689,7 +689,7 @@ int? parseServicePort(String line, {
/// Tries to extract a URL from the string.
///
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
Uri? parseServiceUri(String line, {
Pattern? prefix,
}) {

View File

@@ -1184,11 +1184,11 @@ class PerfTestWithSkSL extends PerfTest {
await _generateSkSL();
// Build the app with SkSL artifacts and run that app
final String observatoryUri = await _runApp(skslPath: _skslJsonFileName);
final String vmServiceUri = await _runApp(skslPath: _skslJsonFileName);
// Attach to the running app and run the final driver test to get metrics.
final TaskResult result = await internalRun(
existingApp: observatoryUri,
existingApp: vmServiceUri,
);
_runProcess.kill();
@@ -1207,8 +1207,8 @@ class PerfTestWithSkSL extends PerfTest {
// `--write-sksl-on-exit` option doesn't seem to be compatible with
// `flutter drive --existing-app` as it will complain web socket connection
// issues.
final String observatoryUri = await _runApp(cacheSkSL: true);
await super.internalRun(cacheSkSL: true, existingApp: observatoryUri);
final String vmServiceUri = await _runApp(cacheSkSL: true);
await super.internalRun(cacheSkSL: true, existingApp: vmServiceUri);
_runProcess.kill();
await _runProcess.exitCode;

View File

@@ -19,7 +19,7 @@ void main() {
group('parse service', () {
const String badOutput = 'No uri here';
const String sampleOutput = 'An Observatory debugger and profiler on '
const String sampleOutput = 'A Dart VM Service on '
'Pixel 3 XL is available at: http://127.0.0.1:9090/LpjUpsdEjqI=/';
test('uri', () {