#perf-events #proc #kernel

app samply

A command line profiler for macOS and Linux

8 releases (5 breaking)

0.13.1 Feb 1, 2025
0.13.0 Feb 1, 2025
0.12.0 Apr 16, 2024
0.11.0 Jan 6, 2023
0.0.0 Jul 17, 2022

#107 in Unix APIs

Download history 555/week @ 2024-12-06 283/week @ 2024-12-13 195/week @ 2024-12-20 186/week @ 2024-12-27 558/week @ 2025-01-03 675/week @ 2025-01-10 449/week @ 2025-01-17 305/week @ 2025-01-24 1068/week @ 2025-01-31 556/week @ 2025-02-07 635/week @ 2025-02-14 1299/week @ 2025-02-21 756/week @ 2025-02-28 570/week @ 2025-03-07 844/week @ 2025-03-14 654/week @ 2025-03-21

2,947 downloads per month

MIT/Apache

1.5MB
28K SLoC

samply

samply is a command line CPU profiler which uses the Firefox profiler as its UI.

samply works on macOS, Linux, and Windows.

In order to profile the execution of ./my-application, prepend samply record to the command invocation:

samply record ./my-application my-arguments

On Linux, samply uses perf events. You can grant temporary access by running:

echo '1' | sudo tee /proc/sys/kernel/perf_event_paranoid

Visit the git repository for more information.

Dependencies

~55–105MB
~1.5M SLoC