removed obsolete timelineArgumentsIndicatingLandmarkEvent (#101382)
This commit is contained in:
parent
e6f3022890
commit
9124287060
@ -82,23 +82,6 @@ Future<T> debugInstrumentAction<T>(String description, Future<T> Function() acti
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Argument passed to [dart:developer.Timeline] events in order to cause those
|
|
||||||
/// events to be shown in the developer-centric version of the Observatory
|
|
||||||
/// Timeline.
|
|
||||||
///
|
|
||||||
/// Generally these indicate landmark events such as the build phase or layout.
|
|
||||||
///
|
|
||||||
/// [DiagnosticsNode.toTimelineArguments] includes these properties in its
|
|
||||||
/// result.
|
|
||||||
///
|
|
||||||
/// See also:
|
|
||||||
///
|
|
||||||
/// * [dart:developer.Timeline.startSync], which typically takes this value as
|
|
||||||
/// its `arguments` argument.
|
|
||||||
const Map<String, String> timelineArgumentsIndicatingLandmarkEvent = <String, String>{
|
|
||||||
'mode': 'basic',
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Configure [debugFormatDouble] using [num.toStringAsPrecision].
|
/// Configure [debugFormatDouble] using [num.toStringAsPrecision].
|
||||||
///
|
///
|
||||||
/// Defaults to null, which uses the default logic of [debugFormatDouble].
|
/// Defaults to null, which uses the default logic of [debugFormatDouble].
|
||||||
|
@ -1547,21 +1547,16 @@ abstract class DiagnosticsNode {
|
|||||||
/// Converts the properties ([getProperties]) of this node to a form useful
|
/// Converts the properties ([getProperties]) of this node to a form useful
|
||||||
/// for [Timeline] event arguments (as in [Timeline.startSync]).
|
/// for [Timeline] event arguments (as in [Timeline.startSync]).
|
||||||
///
|
///
|
||||||
/// The properties specified by [timelineArgumentsIndicatingLandmarkEvent] are
|
|
||||||
/// included in the result.
|
|
||||||
///
|
|
||||||
/// Children ([getChildren]) are omitted.
|
/// Children ([getChildren]) are omitted.
|
||||||
///
|
///
|
||||||
/// This method is only valid in debug builds. In profile builds, this method
|
/// This method is only valid in debug builds. In profile builds, this method
|
||||||
/// throws an exception. In release builds, it returns a copy of
|
/// throws an exception. In release builds it returns null.
|
||||||
/// [timelineArgumentsIndicatingLandmarkEvent] with no arguments added.
|
|
||||||
///
|
///
|
||||||
/// See also:
|
/// See also:
|
||||||
///
|
///
|
||||||
/// * [toJsonMap], which converts this node to a structured form intended for
|
/// * [toJsonMap], which converts this node to a structured form intended for
|
||||||
/// data exchange (e.g. with an IDE).
|
/// data exchange (e.g. with an IDE).
|
||||||
Map<String, String> toTimelineArguments() {
|
Map<String, String>? toTimelineArguments() {
|
||||||
final Map<String, String> result = Map<String, String>.of(timelineArgumentsIndicatingLandmarkEvent);
|
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
// We don't throw in release builds, to avoid hurting users. We also don't do anything useful.
|
// We don't throw in release builds, to avoid hurting users. We also don't do anything useful.
|
||||||
if (kProfileMode) {
|
if (kProfileMode) {
|
||||||
@ -1573,13 +1568,15 @@ abstract class DiagnosticsNode {
|
|||||||
'this application is compiled in profile mode and yet still invoked the method.'
|
'this application is compiled in profile mode and yet still invoked the method.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
final Map<String, String> result = <String, String>{};
|
||||||
for (final DiagnosticsNode property in getProperties()) {
|
for (final DiagnosticsNode property in getProperties()) {
|
||||||
if (property.name != null) {
|
if (property.name != null) {
|
||||||
result[property.name!] = property.toDescription(parentConfiguration: singleLineTextConfiguration);
|
result[property.name!] = property.toDescription(parentConfiguration: singleLineTextConfiguration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Serialize the node to a JSON map according to the configuration provided
|
/// Serialize the node to a JSON map according to the configuration provided
|
||||||
|
@ -513,7 +513,7 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture
|
|||||||
await super.performReassemble();
|
await super.performReassemble();
|
||||||
if (BindingBase.debugReassembleConfig?.widgetName == null) {
|
if (BindingBase.debugReassembleConfig?.widgetName == null) {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.startSync('Preparing Hot Reload (layout)', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
Timeline.startSync('Preparing Hot Reload (layout)');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
renderView.reassemble();
|
renderView.reassemble();
|
||||||
|
@ -1369,15 +1369,15 @@ abstract class RenderBox extends RenderObject {
|
|||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
if (shouldCache) {
|
if (shouldCache) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhanceLayoutTimelineArguments) {
|
if (debugEnhanceLayoutTimelineArguments) {
|
||||||
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
||||||
} else {
|
} else {
|
||||||
debugTimelineArguments = Map<String, String>.of(debugTimelineArguments);
|
debugTimelineArguments = <String, String>{};
|
||||||
}
|
}
|
||||||
debugTimelineArguments['intrinsics dimension'] = describeEnum(dimension);
|
debugTimelineArguments!['intrinsics dimension'] = describeEnum(dimension);
|
||||||
debugTimelineArguments['intrinsics argument'] = '$argument';
|
debugTimelineArguments!['intrinsics argument'] = '$argument';
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
@ -1833,14 +1833,14 @@ abstract class RenderBox extends RenderObject {
|
|||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
if (shouldCache) {
|
if (shouldCache) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhanceLayoutTimelineArguments) {
|
if (debugEnhanceLayoutTimelineArguments) {
|
||||||
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
||||||
} else {
|
} else {
|
||||||
debugTimelineArguments = Map<String, String>.of(debugTimelineArguments);
|
debugTimelineArguments = <String, String>{};
|
||||||
}
|
}
|
||||||
debugTimelineArguments['getDryLayout constraints'] = '$constraints';
|
debugTimelineArguments!['getDryLayout constraints'] = '$constraints';
|
||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
|
@ -858,11 +858,10 @@ class PipelineOwner {
|
|||||||
/// See [RendererBinding] for an example of how this function is used.
|
/// See [RendererBinding] for an example of how this function is used.
|
||||||
void flushLayout() {
|
void flushLayout() {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhanceLayoutTimelineArguments) {
|
if (debugEnhanceLayoutTimelineArguments) {
|
||||||
debugTimelineArguments = <String, String>{
|
debugTimelineArguments = <String, String>{
|
||||||
...debugTimelineArguments,
|
|
||||||
'dirty count': '${_nodesNeedingLayout.length}',
|
'dirty count': '${_nodesNeedingLayout.length}',
|
||||||
'dirty list': '$_nodesNeedingLayout',
|
'dirty list': '$_nodesNeedingLayout',
|
||||||
};
|
};
|
||||||
@ -931,7 +930,7 @@ class PipelineOwner {
|
|||||||
/// [flushPaint].
|
/// [flushPaint].
|
||||||
void flushCompositingBits() {
|
void flushCompositingBits() {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.startSync('UPDATING COMPOSITING BITS', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
Timeline.startSync('UPDATING COMPOSITING BITS');
|
||||||
}
|
}
|
||||||
_nodesNeedingCompositingBitsUpdate.sort((RenderObject a, RenderObject b) => a.depth - b.depth);
|
_nodesNeedingCompositingBitsUpdate.sort((RenderObject a, RenderObject b) => a.depth - b.depth);
|
||||||
for (final RenderObject node in _nodesNeedingCompositingBitsUpdate) {
|
for (final RenderObject node in _nodesNeedingCompositingBitsUpdate) {
|
||||||
@ -964,11 +963,10 @@ class PipelineOwner {
|
|||||||
/// See [RendererBinding] for an example of how this function is used.
|
/// See [RendererBinding] for an example of how this function is used.
|
||||||
void flushPaint() {
|
void flushPaint() {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhancePaintTimelineArguments) {
|
if (debugEnhancePaintTimelineArguments) {
|
||||||
debugTimelineArguments = <String, String>{
|
debugTimelineArguments = <String, String>{
|
||||||
...debugTimelineArguments,
|
|
||||||
'dirty count': '${_nodesNeedingPaint.length}',
|
'dirty count': '${_nodesNeedingPaint.length}',
|
||||||
'dirty list': '$_nodesNeedingPaint',
|
'dirty list': '$_nodesNeedingPaint',
|
||||||
};
|
};
|
||||||
@ -1080,7 +1078,7 @@ class PipelineOwner {
|
|||||||
if (_semanticsOwner == null)
|
if (_semanticsOwner == null)
|
||||||
return;
|
return;
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.startSync('SEMANTICS', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
Timeline.startSync('SEMANTICS');
|
||||||
}
|
}
|
||||||
assert(_semanticsOwner != null);
|
assert(_semanticsOwner != null);
|
||||||
assert(() {
|
assert(() {
|
||||||
@ -1796,7 +1794,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
void layout(Constraints constraints, { bool parentUsesSize = false }) {
|
void layout(Constraints constraints, { bool parentUsesSize = false }) {
|
||||||
assert(!_debugDisposed);
|
assert(!_debugDisposed);
|
||||||
if (!kReleaseMode && debugProfileLayoutsEnabled) {
|
if (!kReleaseMode && debugProfileLayoutsEnabled) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhanceLayoutTimelineArguments) {
|
if (debugEnhanceLayoutTimelineArguments) {
|
||||||
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
||||||
@ -2402,7 +2400,7 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
|
|||||||
if (_needsLayout)
|
if (_needsLayout)
|
||||||
return;
|
return;
|
||||||
if (!kReleaseMode && debugProfilePaintsEnabled) {
|
if (!kReleaseMode && debugProfilePaintsEnabled) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhancePaintTimelineArguments) {
|
if (debugEnhancePaintTimelineArguments) {
|
||||||
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = toDiagnosticsNode().toTimelineArguments();
|
||||||
|
@ -221,7 +221,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
|
|||||||
/// Actually causes the output of the rendering pipeline to appear on screen.
|
/// Actually causes the output of the rendering pipeline to appear on screen.
|
||||||
void compositeFrame() {
|
void compositeFrame() {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.startSync('COMPOSITING', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
Timeline.startSync('COMPOSITING');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final ui.SceneBuilder builder = ui.SceneBuilder();
|
final ui.SceneBuilder builder = ui.SceneBuilder();
|
||||||
|
@ -1023,7 +1023,7 @@ mixin SchedulerBinding on BindingBase {
|
|||||||
/// statements printed during a frame from those printed between frames (e.g.
|
/// statements printed during a frame from those printed between frames (e.g.
|
||||||
/// in response to events or timers).
|
/// in response to events or timers).
|
||||||
void handleBeginFrame(Duration? rawTimeStamp) {
|
void handleBeginFrame(Duration? rawTimeStamp) {
|
||||||
_frameTimelineTask?.start('Frame', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
_frameTimelineTask?.start('Frame');
|
||||||
_firstRawTimeStampInEpoch ??= rawTimeStamp;
|
_firstRawTimeStampInEpoch ??= rawTimeStamp;
|
||||||
_currentFrameTimeStamp = _adjustForEpoch(rawTimeStamp ?? _lastRawTimeStamp);
|
_currentFrameTimeStamp = _adjustForEpoch(rawTimeStamp ?? _lastRawTimeStamp);
|
||||||
if (rawTimeStamp != null)
|
if (rawTimeStamp != null)
|
||||||
@ -1050,7 +1050,7 @@ mixin SchedulerBinding on BindingBase {
|
|||||||
_hasScheduledFrame = false;
|
_hasScheduledFrame = false;
|
||||||
try {
|
try {
|
||||||
// TRANSIENT FRAME CALLBACKS
|
// TRANSIENT FRAME CALLBACKS
|
||||||
_frameTimelineTask?.start('Animate', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
_frameTimelineTask?.start('Animate');
|
||||||
_schedulerPhase = SchedulerPhase.transientCallbacks;
|
_schedulerPhase = SchedulerPhase.transientCallbacks;
|
||||||
final Map<int, _FrameCallbackEntry> callbacks = _transientCallbacks;
|
final Map<int, _FrameCallbackEntry> callbacks = _transientCallbacks;
|
||||||
_transientCallbacks = <int, _FrameCallbackEntry>{};
|
_transientCallbacks = <int, _FrameCallbackEntry>{};
|
||||||
|
@ -2563,11 +2563,10 @@ class BuildOwner {
|
|||||||
return true;
|
return true;
|
||||||
}());
|
}());
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (debugEnhanceBuildTimelineArguments) {
|
if (debugEnhanceBuildTimelineArguments) {
|
||||||
debugTimelineArguments = <String, String>{
|
debugTimelineArguments = <String, String>{
|
||||||
...debugTimelineArguments,
|
|
||||||
'dirty count': '${_dirtyElements.length}',
|
'dirty count': '${_dirtyElements.length}',
|
||||||
'dirty list': '$_dirtyElements',
|
'dirty list': '$_dirtyElements',
|
||||||
'lock level': '$_debugStateLockLevel',
|
'lock level': '$_debugStateLockLevel',
|
||||||
@ -2643,7 +2642,7 @@ class BuildOwner {
|
|||||||
}());
|
}());
|
||||||
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(element.widget);
|
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(element.widget);
|
||||||
if (isTimelineTracked) {
|
if (isTimelineTracked) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
||||||
debugTimelineArguments = element.widget.toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = element.widget.toDiagnosticsNode().toTimelineArguments();
|
||||||
@ -2926,7 +2925,7 @@ class BuildOwner {
|
|||||||
@pragma('vm:notify-debugger-on-exception')
|
@pragma('vm:notify-debugger-on-exception')
|
||||||
void finalizeTree() {
|
void finalizeTree() {
|
||||||
if (!kReleaseMode) {
|
if (!kReleaseMode) {
|
||||||
Timeline.startSync('FINALIZE TREE', arguments: timelineArgumentsIndicatingLandmarkEvent);
|
Timeline.startSync('FINALIZE TREE');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
lockState(_inactiveElements._unmountAll); // this unregisters the GlobalKeys
|
lockState(_inactiveElements._unmountAll); // this unregisters the GlobalKeys
|
||||||
@ -3515,7 +3514,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
updateSlotForChild(child, newSlot);
|
updateSlotForChild(child, newSlot);
|
||||||
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(newWidget);
|
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(newWidget);
|
||||||
if (isTimelineTracked) {
|
if (isTimelineTracked) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
||||||
debugTimelineArguments = newWidget.toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = newWidget.toDiagnosticsNode().toTimelineArguments();
|
||||||
@ -3780,7 +3779,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
|
|||||||
|
|
||||||
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(newWidget);
|
final bool isTimelineTracked = !kReleaseMode && _isProfileBuildsEnabledFor(newWidget);
|
||||||
if (isTimelineTracked) {
|
if (isTimelineTracked) {
|
||||||
Map<String, String> debugTimelineArguments = timelineArgumentsIndicatingLandmarkEvent;
|
Map<String, String>? debugTimelineArguments;
|
||||||
assert(() {
|
assert(() {
|
||||||
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
if (kDebugMode && debugEnhanceBuildTimelineArguments) {
|
||||||
debugTimelineArguments = newWidget.toDiagnosticsNode().toTimelineArguments();
|
debugTimelineArguments = newWidget.toDiagnosticsNode().toTimelineArguments();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user