Files
2026-02-10 23:04:37 +01:00

17 lines
345 B
Nix

{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
perf
hotspot
(writeShellScriptBin "start-recording" ''
PID=$(pgrep $1)
if [ -z "$PID" ]; then
echo "Process $1 not found."
exit 1
fi
sudo perf record -F 999 -p $PID -g
sudo chown $USER:$(id -gn $USER) perf.data
'')
];
}