google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)
https://www.perfetto.dev
Apache License 2.0
2.81k stars 350 forks source link

process_sort_index support or alternative suggestions #764

Open nikhilgdev opened 6 months ago

nikhilgdev commented 6 months ago

Hi, My team is working on a project that generates a flow of timed events in a system. I am using the trace event format as described here: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview. Each of these events is described as a process in the JSON file.

Unfortunately, perfetto UI does not order these processes by start time. It seems to order the processes by 'eventfulness' instead.

As a backup, I figured I would use the process_sort_index metadata item to re-order the processes as needed, however, perfetto UI does not respect that.

I see past issues where implementation of process_sort_index has been shot down. Is there an alternative you could suggest for this? Needing to order the processes chronologically is (I would imagine) a need for many projects adopting this UI.

LalitMaganti commented 6 months ago

I don't think there's any suggestion for now. Having arbitrary sorts at the UI level might be something supported at some point but is not a priority.

Our priority is first features for native Perfetto traces (especially Android system tracing). If our project is used in other ways, we're very happy with that but it's not our focus.