Skip to content

polish(datamap): pprof-aligned metrics and mapping-only map.json#118

Merged
AlexsanderHamir merged 4 commits into
mainfrom
polish/benchmark-data-mapping
Jul 7, 2026
Merged

polish(datamap): pprof-aligned metrics and mapping-only map.json#118
AlexsanderHamir merged 4 commits into
mainfrom
polish/benchmark-data-mapping

Conversation

@AlexsanderHamir

Copy link
Copy Markdown
Owner

Summary

  • Align profile parsing with go tool pprof -top by using the last SampleType index and adding internal/pprofscale for display formatting on profile totals.
  • Add profile_cost_columns, profile_cost_triage, and hotspots_metrics_note so agents can interpret hotspots text without guessing column meanings.
  • Refactor map.json into an artifact index: drop duplicated top_symbols, per-function flat/cum on source_lines, and hot_path_summary. Metrics stay in hotspots/*.txt; map links paths only.

Test plan

  • go test ./internal/datamap/ ./internal/pprofscale/ ./parser/ ./engine/collect/
  • Re-collect baseline; map.json shrinks ~21k to ~8k tokens (tiktoken) while hotspots text still matches pprof output

Made with Cursor

AlexsanderHamir and others added 4 commits July 6, 2026 19:05
Use the last SampleType index for aggregation and emit flat_display/cum_display via internal/pprofscale so raw values and formatted strings match hotspots output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Emit flat/cum column definitions and a triage hint so agents can read hotspots text without guessing column meanings.

Co-authored-by: Cursor <cursoragent@cursor.com>
… metrics

Drop top_symbols, per-function flat/cum on source_lines, and hot_path_summary. Hotspots and call_trees sections link to text artifacts only; metrics stay in hotspots/*.txt.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add unit string constants, fix variable shadowing, and gofmt alignment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@AlexsanderHamir
AlexsanderHamir merged commit 3d51211 into main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant