fish: Add helpers for seeing & collecting perf data

This commit is contained in:
Sanchayan Maity 2021-09-24 17:00:13 +05:30
parent 9ab36d4b1b
commit cba3c92d06

View file

@ -371,6 +371,16 @@ function cdG --description "Select a coredump to run coredumpctl gdb"
coredumpctl gdb (echo $result | awk -F" " '{print $5}') coredumpctl gdb (echo $result | awk -F" " '{print $5}')
end end
function pft --description "Select a process to run perf top"
set proc (ps -e | fzf | awk '{print $1}')
perf top -p $proc
end
function pfr --description "Select a process to record performance data in given file name"
set proc (ps -e | fzf | awk '{print $1}')
perf record -F 99 -o $argv -p $proc
end
fzf_key_bindings fzf_key_bindings
starship init fish | source starship init fish | source