Instrument vm service extensions in the gallery (#17977)
https://github.com/flutter/flutter/issues/17956 * Add a `debugInstrumentAction()` method that will wrap an action in a stopwatch and print the time it took to run the action. * Add a global `debugInstrumentationEnabled` that will control whether `debugInstrumentAction()` does anything (even in debug builds). * Add some basic instrumentation to `registerServiceExtension()` * Temporarily enable the `debugInstrumentationEnabled` flag in the Gallery to give us better visibility into what's happening in https://github.com/flutter/flutter/issues/17956
This commit is contained in:
@@ -5,11 +5,15 @@
|
||||
// Thanks for checking out Flutter!
|
||||
// Like what you see? Tweet us @flutterio
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'gallery/app.dart';
|
||||
|
||||
void main() {
|
||||
// Temporary debugging hook for https://github.com/flutter/flutter/issues/17956
|
||||
debugInstrumentationEnabled = true;
|
||||
|
||||
// Overriding https://github.com/flutter/flutter/issues/13736 for better
|
||||
// visual effect at the cost of performance.
|
||||
MaterialPageRoute.debugEnableFadingRoutes = true; // ignore: deprecated_member_use
|
||||
|
||||
Reference in New Issue
Block a user