add cli options to generate perfetto trace#246
Conversation
This is a very good idea, it will also allow to cover it with tests |
|
@UnamedRus CI failed, PTAL |
azat
left a comment
There was a problem hiding this comment.
Everything else I will look later
| let mut builder = PerfettoTraceBuilder::new( | ||
| perfetto_options.per_server, | ||
| perfetto_options.text_log_android, | ||
| ); |
There was a problem hiding this comment.
This should be passed from command line
There was a problem hiding this comment.
I'm not sure about those two.
IMO, android style logs should be enabled/used by default.
Per server track split also make sense, compared to not have it.
(Actually, in order to use TracePacketDefaults, there should/will be much more detailed sequences/tracks)
|
@UnamedRus ping me once all comments will be resolved |
| .view | ||
| .output | ||
| .clone() | ||
| .unwrap_or_else(|| "/tmp/chdig_perfetto.pftrace".to_string()); |
There was a problem hiding this comment.
Why this is not the default for cli option?
There was a problem hiding this comment.
It's "generic" option now, so hardcoding perfetto naming seems wrong.
Anyway, it set to ./ as default.
If it ./
for server level -> trace saved as ./server_perfetto_trace.pftrace
for query level ./query_id.pftrace
To simplify testing/debug of perfetto different versions
Also, idea is to make "chdig" as togo tool for making exports for research/debug purposes.