diff --git a/packages/devtools_app/lib/src/screens/memory/panes/diff/widgets/classes_table_diff.dart b/packages/devtools_app/lib/src/screens/memory/panes/diff/widgets/classes_table_diff.dart index a40c9ebc2e2..3c2900e56da 100644 --- a/packages/devtools_app/lib/src/screens/memory/panes/diff/widgets/classes_table_diff.dart +++ b/packages/devtools_app/lib/src/screens/memory/panes/diff/widgets/classes_table_diff.dart @@ -163,6 +163,7 @@ class _SizeColumn extends ColumnData { _SizeColumn(this.dataPart, this.sizeType) : super( columnTitle(dataPart), + titleTooltip: columnTooltip(dataPart), fixedWidthPx: 80.0, alignment: ColumnAlignment.right, ); @@ -183,6 +184,24 @@ class _SizeColumn extends ColumnData { } } + static String columnTooltip(_DataPart dataPart) { + switch (dataPart) { + case _DataPart.created: + return 'Size of this class allocated between the two snapshots.\n' + 'This is the value for this row, not a cumulative total.'; + case _DataPart.deleted: + return 'Size of this class released between the two snapshots.\n' + 'This is the value for this row, not a cumulative total.'; + case _DataPart.delta: + return 'Net size change of this class between the two snapshots ' + '(allocated minus freed).\n' + 'This is the value for this row, not a cumulative total.'; + case _DataPart.persisted: + return 'Size of this class present in both snapshots.\n' + 'This is the value for this row, not a cumulative total.'; + } + } + @override int getValue(DiffClassData data) { switch (sizeType) { diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index 01ad0a7d9e2..1b72a850546 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md @@ -36,6 +36,9 @@ TODO: Remove this section if there are not any updates. ## Memory updates * Added the ability to pin classes to the top of the Profile Memory table. [#8898](https://github.com/flutter/devtools/issues/8898) +* Clarified that Diff Snapshots size columns (Allocated, Freed, Delta, Persisted) + show memory for that class row, not a running total of the table. + [#8837](https://github.com/flutter/devtools/issues/8837) ## Debugger updates