Add completion spec: pprof#265
Conversation
Adds a comprehensive completion spec for pprof (github.com/google/pprof), the profiling data visualization and analysis tool. The spec covers all documented output formats, options, option groups (granularity, sort), source options, misc options, and legacy convenience flags, matching the pprof --help surface. Structured suggestions are provided for enumerated values like -sample_index, -symbolize, and -unit. A saved_profiles generator is added that lists cached profile files in $PPROF_TMPDIR (defaulting to $HOME/pprof). It is used to power completions for the positional source argument and for -base/-diff_base. Co-Authored-By: Oz <oz-agent@warp.dev>
APP-4152 Add pprof completions
https://github.com/google/pprof A tool for visualizing and analyzing profiling data. |
|
Adds a comprehensive completion spec for
pprof, the profiling data visualization and analysis tool.Linear: APP-4152
What's included
command-signatures/json/pprof.json— full spec covering:-text,-dot,-png,-svg,-pdf,-http,-web,-weblist,-tree,-traces,-peek,-list,-disasm,-callgrind,-kcachegrind,-eog,-evince,-gv,-gif,-ps,-proto,-raw,-tags,-top,-topproto,-comments). Formats that take a regexp (-list,-peek,-disasm,-weblist) declare their arg.-focus,-ignore,-hide,-show,-show_from,-prune_from,-nodecount,-nodefraction,-edgefraction,-call_tree,-compact_labels,-divide_by,-drop_negative,-intel_syntax,-mean,-noinlines,-normalize,-output,-relative_percentages,-sample_index,-showcolumns,-source_path,-tagfocus,-taghide,-tagignore,-tagleaf,-tagroot,-tagshow,-trim,-trim_path,-unit).-functions,-filefunctions,-files,-lines,-addresses-cum,-flat-seconds,-timeout,-buildid,-add_comment,-diff_base,-base,-symbolize,-tls_cert,-tls_key,-tls_ca).-http,-no_browser,-tools,-all_frames).-inuse_space,-inuse_objects,-alloc_space,-alloc_objects,-total_delay,-contentions,-mean_delay).suggestionsfor enumerated values:-sample_index:inuse_space,inuse_objects,alloc_space,alloc_objects,cpu,samples,contentions,delay-symbolize:none,local,fastlocal,remote,force(withrequiresSeparator: truesince pprof only accepts-symbolize=<mode>)-unit:auto,nanoseconds,microseconds,milliseconds,seconds,minutes,hours,bytes,kilobytes,megabytes,gigabytesfilepaths/folderstemplates for file-/directory-taking flags.saved_profilesgenerator plus thefilepathstemplate.flagsArePosixNoncompliant: truesince pprof uses Go'sflagpackage (single-dash flags).command-signatures/src/generators/pprof.rs— newsaved_profilesgenerator that lists cached profile files in$PPROF_TMPDIR(defaulting to$HOME/pprof). It is referenced by the positionalsourceargument and by-base/-diff_base. The generator matches common profile filename patterns (*.pb.gz,*.pprof,*.prof,profile,profile.pb) and is cross-platform (usesfindwith POSIX-compatible options and thePPROF_TMPDIRenvironment variable).Validation
npm run format:check: passescargo fmt -p warp-command-signatures -p warp-completion-metadata --check: passescargo clippy -p warp-command-signatures -p warp-completion-metadata --all-targets --all-features -- -D warnings: passescargo test --verbose: 59 passed, 0 failed (main suite) + auxiliary suites all passGenerator shell-level verification
Ran the generator's underlying shell command against a seeded
$HOME/pprofto confirm it returns reasonable profile suggestions:Screenshots
Conversation: https://staging.warp.dev/conversation/58e97815-cba4-41cd-9c4b-0450f19e7b9a
Run: https://oz.staging.warp.dev/runs/019dab86-a5a7-739d-90f0-203c3127383a
This PR was generated with Oz.