8

I am looking for some way to measure startup time of an application. From a moment of clicking the app icon till the moment, when for example login page is visible to the user.

Artur Tomczak
  • 109
  • 2
  • 5

1 Answers1

14

Run

flutter run --trace-startup --profile

The trace output is saved as a JSON file called start_up_info.json under the build directory of your Flutter project. The output lists the elapsed time from app startup to these trace events (captured in microseconds):

  • Time to enter the Flutter engine code.
  • Time to render the first frame of the app.
  • Time to initialize the Flutter framework.
  • Time to complete the Flutter framework initialization.

For example:

content_copy
{
  "engineEnterTimestampMicros": 96025565262,
  "timeToFirstFrameMicros": 2171978,
  "timeToFrameworkInitMicros": 514585,
  "timeAfterFrameworkInitMicros": 1657393
}

Source

CopsOnRoad
  • 237,138
  • 77
  • 654
  • 440