feat: clltk export - Chrome/Perfetto trace event JSON#34
Merged
Conversation
New export subcommand converts trace files (or directories and snapshot archives, with the same recursive and filter options as decode) into Chrome trace event JSON that opens directly in ui.perfetto.dev: tracepoints become instant events with file/line args, span begin/end become async event pairs correlated by the carryable span id, so spans render as tracks even across threads, and spans that never ended stay visibly open. The decoder library gains a typed span_info() accessor on Tracepoint (id, parent, name) so consumers do not parse rendered message strings. Signed-off-by: Jo5ta <jo5ta@mail.de>
The export tests validate the generated JSON structurally against the golden span fixtures on both byte orders: event counts, begin/end pairing by id, the parent relation, timestamp ordering, and source location args - plus a fixture without spans. README gains the ui.perfetto.dev walkthrough. CTF export is recorded in the roadmap as a follow-up (TSDL metadata generation earns its complexity only on concrete demand). Signed-off-by: Jo5ta <jo5ta@mail.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 5/7 — based on the spans PR.
clltk exportconverts decoded traces to Chrome trace event JSON loadable in Perfetto / chrome://tracing: tracepoints as instant events, spans as async begin/end pairs correlated by id, buffers as categories.Integrated: command-line docs, export validation against the golden fixtures. Version 1.5.1.