samply

CLI sampling profiler for analyzing CPU usage of programs

brewmacoslinux
Try with needOr install directly
Source

About

CLI sampling profiler

Commands

samply

Examples

profile a command and see where it spends time$ samply record ./my_program
profile a running process by its PID$ samply record -p 12345
profile with custom sampling frequency$ samply record --sample-rate 100 ./my_program
profile a script and open results in browser$ samply record python script.py
profile and save results to specific file$ samply record -o profile.json ./my_program