Create a custom trace probe in python #3912
-
|
Question Currently I use a python script to transform my trace data (from an embedded system) into a perfetto trace file. Now I would like to fetch my trace data from a websocket server so perfetto can load the data from there. Is this possible? I mean is the expected data the same as a trace file? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'm not sure I understand what this line is trying to say so I'm going to give you a more generic answer: if you are trying to open a trace file from the command line, you should be able to use https://perfetto.dev/docs/faq#how-do-i-open-trace-in-ui-from-command-line- for this. If you just want a single script, then you can take the source of the open_trace_in_ui script and integrate it into yours. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for being to terse. The data arrives on the serial port of a pc and i would like to view it with perfetto on another pc. So I was hoping to be able to create some server that, on request, opens the serial port, captures some data and converts it on the fly into this perfetto protobuf format. All this triggered from within the perfetto ui (record new trace). |
Beta Was this translation helpful? Give feedback.
-
|
Then let me rephrase my question: what format should be returned by the websock server that allows perfetto ui to accept and show it? |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand what this line is trying to say so I'm going to give you a more generic answer: if you are trying to open a trace file from the command line, you should be able to use https://perfetto.dev/docs/faq#how-do-i-open-trace-in-ui-from-command-line- for this. If you just want a single script, then you can take the source of the open_trace_in_ui script and integrate it into yours.