fish: functions: Add a different variant for perf top on a thread

This commit is contained in:
Sanchayan Maity 2024-04-19 18:02:19 +05:30
parent 5623d7c004
commit d1fa95daa9
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
2 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1,6 @@
function pfp --description 'Select a process to run perf top'
set proc (ps -ef | fzf | awk '{print $2}')
if test -n "$proc"
perf top -p $proc
end
end

View File

@ -1,6 +1,6 @@
function pft --description 'Select a process to run perf top'
set proc (ps -ef | fzf | awk '{print $2}')
if test -n "$proc"
perf top -p $proc
function pft --description 'Select a thread to run perf top'
set tid (ps -eLf | fzf | awk '{print $4}')
if test -n "$tid"
perf top -t $tid
end
end