function pfr --description 'Select a process to record performance data in given file name'
    set proc (ps -ef | fzf | awk '{print $2}')
    if test -n "$proc"
        perf record -F 99 -o $argv -p $proc
    end
end
