mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-23 01:04:05 +08:00
openpilot v0.11.1 release
date: 2026-06-04T09:49:56 master commit: c0ab3550eca2e9daf197c46b7e4b24aa9637cf2e
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# find process with name passed in (excluding this process)
|
||||
for PID in $(pgrep -f $1); do
|
||||
if [ "$PID" != "$$" ]; then
|
||||
ps -p $PID -o args
|
||||
TRACE_PID=$PID
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$TRACE_PID" ]; then
|
||||
echo "could not find PID for $1"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo env PATH=$PATH py-spy record -d 5 -o /tmp/perf$TRACE_PID.svg -p $TRACE_PID &&
|
||||
google-chrome /tmp/perf$TRACE_PID.svg
|
||||
Reference in New Issue
Block a user