Skip to content

Commit fbae472

Browse files
authored
Reland "Remove references to Observatory (#118577)" (#121215)
This reverts commit 298d8c7.
1 parent 8765492 commit fbae472

File tree

90 files changed

+511
-490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+511
-490
lines changed

.github/ISSUE_TEMPLATE/5_performance_speed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ assignees: ''
4141
can have an intuitive understanding of what happened. Don’t use
4242
"adb screenrecord", as that affects the performance of the profile run.
4343
44-
5. Open Observatory and save a timeline trace of the performance issue
44+
5. Open Flutter DevTools and save a timeline trace of the performance issue
4545
so we know which functions might be causing it. See "How to Collect
4646
and Read Timeline Traces" on this blog post:
4747
https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499

dev/devicelab/lib/framework/runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Future<TaskResult> runTask(
202202
.transform<String>(const LineSplitter())
203203
.listen((String line) {
204204
if (!uri.isCompleted) {
205-
final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('(Observatory|The Dart VM service is) listening on '));
205+
final Uri? serviceUri = parseServiceUri(line, prefix: RegExp('The Dart VM service is listening on '));
206206
if (serviceUri != null) {
207207
uri.complete(serviceUri);
208208
}

dev/devicelab/lib/framework/utils.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,14 +664,14 @@ Future<void> runAndCaptureAsyncStacks(Future<void> Function() callback) {
664664
bool canRun(String path) => _processManager.canRun(path);
665665

666666
final RegExp _obsRegExp =
667-
RegExp('An Observatory debugger .* is available at: ');
667+
RegExp('A Dart VM Service .* is available at: ');
668668
final RegExp _obsPortRegExp = RegExp(r'(\S+:(\d+)/\S*)$');
669669
final RegExp _obsUriRegExp = RegExp(r'((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)');
670670

671671
/// Tries to extract a port from the string.
672672
///
673673
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
674-
/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
674+
/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
675675
int? parseServicePort(String line, {
676676
Pattern? prefix,
677677
}) {
@@ -689,7 +689,7 @@ int? parseServicePort(String line, {
689689
/// Tries to extract a URL from the string.
690690
///
691691
/// The `prefix`, if specified, is a regular expression pattern and must not contain groups.
692-
/// `prefix` defaults to the RegExp: `An Observatory debugger .* is available at: `.
692+
/// `prefix` defaults to the RegExp: `A Dart VM Service .* is available at: `.
693693
Uri? parseServiceUri(String line, {
694694
Pattern? prefix,
695695
}) {

dev/devicelab/lib/tasks/perf_tests.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,11 +1184,11 @@ class PerfTestWithSkSL extends PerfTest {
11841184
await _generateSkSL();
11851185

11861186
// Build the app with SkSL artifacts and run that app
1187-
final String observatoryUri = await _runApp(skslPath: _skslJsonFileName);
1187+
final String vmServiceUri = await _runApp(skslPath: _skslJsonFileName);
11881188

11891189
// Attach to the running app and run the final driver test to get metrics.
11901190
final TaskResult result = await internalRun(
1191-
existingApp: observatoryUri,
1191+
existingApp: vmServiceUri,
11921192
);
11931193

11941194
_runProcess.kill();
@@ -1207,8 +1207,8 @@ class PerfTestWithSkSL extends PerfTest {
12071207
// `--write-sksl-on-exit` option doesn't seem to be compatible with
12081208
// `flutter drive --existing-app` as it will complain web socket connection
12091209
// issues.
1210-
final String observatoryUri = await _runApp(cacheSkSL: true);
1211-
await super.internalRun(cacheSkSL: true, existingApp: observatoryUri);
1210+
final String vmServiceUri = await _runApp(cacheSkSL: true);
1211+
await super.internalRun(cacheSkSL: true, existingApp: vmServiceUri);
12121212
_runProcess.kill();
12131213
await _runProcess.exitCode;
12141214

dev/devicelab/test/utils_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void main() {
1919

2020
group('parse service', () {
2121
const String badOutput = 'No uri here';
22-
const String sampleOutput = 'An Observatory debugger and profiler on '
22+
const String sampleOutput = 'A Dart VM Service on '
2323
'Pixel 3 XL is available at: http://127.0.0.1:9090/LpjUpsdEjqI=/';
2424

2525
test('uri', () {

packages/flutter/lib/src/foundation/binding.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ abstract class BindingBase {
138138
/// First calls [initInstances] to have bindings initialize their
139139
/// instance pointers and other state, then calls
140140
/// [initServiceExtensions] to have bindings initialize their
141-
/// observatory service extensions, if any.
141+
/// VM service extensions, if any.
142142
BindingBase() {
143143
developer.Timeline.startSync('Framework initialization');
144144
assert(() {

packages/flutter/lib/src/painting/shader_warm_up.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ abstract class ShaderWarmUp {
6969
///
7070
/// To decide which draw operations to be added to your custom warm up
7171
/// process, consider capturing an skp using `flutter screenshot
72-
/// --observatory-uri=<uri> --type=skia` and analyzing it with
72+
/// --vm-service-uri=<uri> --type=skia` and analyzing it with
7373
/// <https://debugger.skia.org/>. Alternatively, one may run the app with
7474
/// `flutter run --trace-skia` and then examine the raster thread in the
75-
/// observatory timeline to see which Skia draw operations are commonly used,
75+
/// Flutter DevTools timeline to see which Skia draw operations are commonly used,
7676
/// and which shader compilations are causing jank.
7777
@protected
7878
Future<void> warmUpOnCanvas(ui.Canvas canvas);

packages/flutter/lib/src/widgets/app.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ class WidgetsApp extends StatefulWidget {
11721172

11731173
/// If true, forces the performance overlay to be visible in all instances.
11741174
///
1175-
/// Used by the `showPerformanceOverlay` observatory extension.
1175+
/// Used by the `showPerformanceOverlay` VM service extension.
11761176
static bool showPerformanceOverlayOverride = false;
11771177

11781178
/// If true, forces the widget inspector to be visible.
@@ -1182,12 +1182,12 @@ class WidgetsApp extends StatefulWidget {
11821182
/// The inspector allows you to select a location on your device or emulator
11831183
/// and view what widgets and render objects associated with it. An outline of
11841184
/// the selected widget and some summary information is shown on device and
1185-
/// more detailed information is shown in the IDE or Observatory.
1185+
/// more detailed information is shown in the IDE or DevTools.
11861186
static bool debugShowWidgetInspectorOverride = false;
11871187

11881188
/// If false, prevents the debug banner from being visible.
11891189
///
1190-
/// Used by the `debugAllowBanner` observatory extension.
1190+
/// Used by the `debugAllowBanner` VM service extension.
11911191
///
11921192
/// This is how `flutter run` turns off the banner when you take a screen shot
11931193
/// with "s".

packages/flutter/lib/src/widgets/debug.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import 'table.dart';
3333
/// Combined with [debugPrintScheduleBuildForStacks], this lets you watch a
3434
/// widget's dirty/clean lifecycle.
3535
///
36-
/// To get similar information but showing it on the timeline available from the
37-
/// Observatory rather than getting it in the console (where it can be
36+
/// To get similar information but showing it on the timeline available from
37+
/// Flutter DevTools rather than getting it in the console (where it can be
3838
/// overwhelming), consider [debugProfileBuildsEnabled].
3939
///
4040
/// See also:

packages/flutter/lib/src/widgets/widget_inspector.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ class _WidgetInspectorService = Object with WidgetInspectorService;
703703
/// operation making it easier to avoid memory leaks.
704704
///
705705
/// All methods in this class are appropriate to invoke from debugging tools
706-
/// using the Observatory service protocol to evaluate Dart expressions of the
706+
/// using the VM service protocol to evaluate Dart expressions of the
707707
/// form `WidgetInspectorService.instance.methodName(arg1, arg2, ...)`. If you
708708
/// make changes to any instance method of this class you need to verify that
709709
/// the [Flutter IntelliJ Plugin](https://github.com/flutter/flutter-intellij/blob/master/README.md)
@@ -712,7 +712,7 @@ class _WidgetInspectorService = Object with WidgetInspectorService;
712712
/// All methods returning String values return JSON.
713713
mixin WidgetInspectorService {
714714
/// Ring of cached JSON values to prevent JSON from being garbage
715-
/// collected before it can be requested over the Observatory protocol.
715+
/// collected before it can be requested over the VM service protocol.
716716
final List<String?> _serializeRing = List<String?>.filled(20, null);
717717
int _serializeRingIndex = 0;
718718

@@ -739,7 +739,7 @@ mixin WidgetInspectorService {
739739
/// when the inspection target changes on device.
740740
InspectorSelectionChangedCallback? selectionChangedCallback;
741741

742-
/// The Observatory protocol does not keep alive object references so this
742+
/// The VM service protocol does not keep alive object references so this
743743
/// class needs to manually manage groups of objects that should be kept
744744
/// alive.
745745
final Map<String, Set<_InspectorReferenceData>> _groups = <String, Set<_InspectorReferenceData>>{};
@@ -1690,7 +1690,7 @@ mixin WidgetInspectorService {
16901690

16911691
/// Wrapper around `json.encode` that uses a ring of cached values to prevent
16921692
/// the Dart garbage collector from collecting objects between when
1693-
/// the value is returned over the Observatory protocol and when the
1693+
/// the value is returned over the VM service protocol and when the
16941694
/// separate observatory protocol command has to be used to retrieve its full
16951695
/// contents.
16961696
//

0 commit comments

Comments
 (0)