mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Disable jank metrics for web (#109356)
This commit is contained in:
parent
1dfa847785
commit
edd466811d
@ -120,7 +120,7 @@ class CommandHelp {
|
||||
|
||||
late final CommandHelpOption j = _makeOption(
|
||||
'j',
|
||||
'Dump frame raster stats for the current frame.',
|
||||
'Dump frame raster stats for the current frame. (Unsupported for web)',
|
||||
);
|
||||
|
||||
late final CommandHelpOption k = _makeOption(
|
||||
|
@ -701,6 +701,10 @@ abstract class ResidentHandlers {
|
||||
return false;
|
||||
}
|
||||
for (final FlutterDevice? device in flutterDevices) {
|
||||
if (device?.targetPlatform == TargetPlatform.web_javascript) {
|
||||
logger!.printWarning('Unable to get jank metrics for web');
|
||||
continue;
|
||||
}
|
||||
final List<FlutterView> views = await device!.vmService!.getFlutterViews();
|
||||
for (final FlutterView view in views) {
|
||||
final Map<String, Object>? rasterData =
|
||||
|
@ -177,6 +177,12 @@ void main() {
|
||||
await terminalHandler.processTerminalInput('a');
|
||||
});
|
||||
|
||||
testWithoutContext('j unsupported jank metrics for web', () async {
|
||||
final TerminalHandler terminalHandler = setUpTerminalHandler(<FakeVmServiceRequest>[], web: true);
|
||||
await terminalHandler.processTerminalInput('j');
|
||||
expect(terminalHandler.logger.warningText.contains('Unable to get jank metrics for web'), true);
|
||||
});
|
||||
|
||||
testWithoutContext('a - debugToggleProfileWidgetBuilds without service protocol is skipped', () async {
|
||||
final TerminalHandler terminalHandler = setUpTerminalHandler(<FakeVmServiceRequest>[], supportsServiceProtocol: false);
|
||||
|
||||
|
@ -612,7 +612,7 @@ void main() {
|
||||
'a Toggle timeline events for all widget build methods. (debugProfileWidgetBuilds)',
|
||||
'M Write SkSL shaders to a unique file in the project directory.',
|
||||
'g Run source code generators.',
|
||||
'j Dump frame raster stats for the current frame.',
|
||||
'j Dump frame raster stats for the current frame. (Unsupported for web)',
|
||||
'h Repeat this help message.',
|
||||
'd Detach (terminate "flutter run" but leave application running).',
|
||||
'c Clear the screen',
|
||||
|
Loading…
Reference in New Issue
Block a user