collect: add call tree text and JSON for all profiles#115
Merged
Conversation
Introduce CallTreesDir and TagLayout helpers for tree text and JSON artifacts under .prof/<tag>/call_trees/. Co-authored-by: Cursor <cursoragent@cursor.com>
Mirror hotspot flags (-cum -nodefraction=0 -edgefraction=0) for -tree output. Co-authored-by: Cursor <cursoragent@cursor.com>
Aggregate all functions and caller-callee edges from pprof samples with flat/cum metrics. Co-authored-by: Cursor <cursoragent@cursor.com>
Wire pprof -tree and in-process call graph JSON into auto and manual collection paths. Co-authored-by: Cursor <cursoragent@cursor.com>
Describe tree text and JSON artifacts in collect and workspace guides. Co-authored-by: Cursor <cursoragent@cursor.com>
Extract processOneProfile to reduce cognitive complexity, fix goimports alignment, and eliminate err shadowing. Co-authored-by: Cursor <cursoragent@cursor.com>
Extract a single argv builder for -top and -tree so collect uses one code path for human-readable pprof output. Co-authored-by: Cursor <cursoragent@cursor.com>
Parse each profile once into flat/cum plus call-graph data; CallGraphFromPath delegates to BundleFromPath. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace duplicate pprof text helpers and imperative emit steps with runPprofReport, parse-once ProfileBundle, and a Required/BestEffort artifact catalog shared by auto and manual collection. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove in-process call-graph JSON export, ProfileBundle, and related parser code. Call trees are collected as text via go tool pprof -tree only. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Profile artifact refactor (follow-up commits on this branch)
unPprofReport\ replace duplicate -top\ / -tree\ helpers.
Test plan