flutter / flutter/devtools

Improve UX and Timeline API for Flutter performance viewer task timelines 2

Offen
#8,045 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
P2 screen: performance
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

This is a continuation of a previous issue I've seen [here](https://github.com/flutter/devtools/issues/6314).

I am trying to use the Performance tool (I use VS code flutter and dart extensions 3.92). I am quite experienced with recording traces using the Perfetto C++ API.

My Issues are as follows:

### UX:
1. It is very hard to understand what period of time we are recording. For instance, what does pause do? what does export data exports?
usually the user would like to record a certain period of time. a **simple start + stop** recording would be helpful. maybe even with a simple clock that displays how much time we are recording.
2. I don't understand what **Clear all** does. after pressing it, I get empty traces if I start recording again.
3. likewise, pause is very unintuitive. what does it pause exactly.
4. It is very hard to filter out irrelevant data from being recorded. What if I only wish to see my traces?
5. In general, it is as if this tool is meant to be used by flutter engine / framework developers and not simply flutter developers who wish to profile their own code.

### Timeline API:
1. it is very hard to predict on which perfetto "track" my traces will end up on. for instance: calling Timeline.startSync / Timeline.finishSync will (maybe) end up on the flutter ui track, whereas Timeline.instantSync will end up on a different Track.
2. TimelineTask creates a Track for each layer. this is undesired.
3. the documentation is very lacking. what does the Map argument in startSync is meant for? what can we do with it?

The most fundamental thing to add to the API is the the ability to have my traces on a separate track. `perfetto::Track(_trackId)`.
This way I can view all of them on a single track in the perfetto trace. and not in between all the flutter traces I am not interested in.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit dem vorherigen Issue #6314 und den Aufzeichnungssteuerungen des Performance-Tools und untersuche anschließend das Verhalten von Timeline.startSync, Timeline.finishSync, Timeline.instantSync und TimelineTask. Definiere vor der Implementierung eine klar abgegrenzte Änderung; sie sollte den Aufzeichnungsbereich und die Steuerungen klar machen, Benutzer-Traces auf einem separaten Perfetto-Track gruppieren und das Map-Argument dokumentieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter
Bereich
observability, performance, tooling
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.