Is it possible to control perfetto ui time position and zoom after loading a trace? #2348
-
|
I want to continuously trace a python service running in production (using tg4perfetto, but that's really just a lightweight tracegen layer) and produce rotating trace files. I can open these fine already with deep linking. I will have a web interface that collects monitoring information and correlates these perfetto traces. My concept is to be able to have perfetto's ui in a separate tab or in an iframe with external dynamic programmatic control over its timeline offset and zoom. Another similar high level capability i will want is the ability to swap out the opened trace dataset with others when navigating far enough away without having to close/reopen the perfetto UI. So far my attempts to use If I try to include hardcoded time values during the initial buffer load e.g.: I get the error
The fact that a time range scroll was understood to be requested shows me i'm barking up the right tree but it's frustrating that I cannot seem to get it to do anything no matter what I try. If i put a postMessage that tries to change the title or fileName on a timeout to run 10000ms later, it just doesn't do anything. I am able to point my browser devtools console to the perfetto ui page context and use I'm trying to use AI to help comb through perfetto's documentation, but it's difficult. I did use PasteMax on (most of) perfetto's documentation dir (1.3M tokens) with Gemini 2.5 Pro in Vertex and it gave me this response:
Can somebody from the project please confirm for me that my information is up to date? That is to say:
I'm 90% sure by this point that the above is the case. However it makes the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
|
I'm trying to load the page as but it becomes forcibly changed to once the trace buffer is loaded. |
Beta Was this translation helpful? Give feedback.
-
|
I think your overarching goal of "rotating trace files" in the way you're going to describe is going to be a janky and suboptimal experience. We don't support "steaming" traces in the UI so updating the contents of traces in the way you describe is not going to work. For the specific problem of planning around a trace programmaticly after the trace is loaded: I think that's something which is not supported today but could probably be added. PRs for that welcome if you can suggest a good design for it. We would need to design some postMessage API so that you can specify what you want to happen. We would probably have it hook into our action system. |
Beta Was this translation helpful? Give feedback.
-
|
Also the idea that you can control the page by changing the URL hash is a pure hallucination of the LLM. There is no such feature. Today both postMessage and the URL params are designed only for controlling behaviour post load and not in the general case when trace has been loaded. |
Beta Was this translation helpful? Give feedback.
I think your overarching goal of "rotating trace files" in the way you're going to describe is going to be a janky and suboptimal experience. We don't support "steaming" traces in the UI so updating the contents of traces in the way you describe is not going to work.
For the specific problem of planning around a trace programmaticly after the trace is loaded: I think that's something which is not supported today but could probably be added. PRs for that welcome if you can suggest a good design for it. We would need to design some postMessage API so that you can specify what you want to happen. We would probably have it hook into our action system.