fish: functions: Add a different variant for perf top on a thread
This commit is contained in:
parent
5623d7c004
commit
d1fa95daa9
2 changed files with 10 additions and 4 deletions
6
fish/.config/fish/functions/pfp.fish
Normal file
6
fish/.config/fish/functions/pfp.fish
Normal 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
|
|
@ -1,6 +1,6 @@
|
||||||
function pft --description 'Select a process to run perf top'
|
function pft --description 'Select a thread to run perf top'
|
||||||
set proc (ps -ef | fzf | awk '{print $2}')
|
set tid (ps -eLf | fzf | awk '{print $4}')
|
||||||
if test -n "$proc"
|
if test -n "$tid"
|
||||||
perf top -p $proc
|
perf top -t $tid
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue