Skip to content

Commit 9713b9c

Browse files
feat (tauri:profile): add cross-platform process profiling
Add macOS support via Taskfile {{OS}} branching and track both dev builds (mt-tauri) and release binaries (mt). Use character class grep trick to avoid self-matching without grep -v. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 363006a commit 9713b9c

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

taskfiles/tauri.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,20 @@ tasks:
263263
- deno run -A npm:@tauri-apps/cli info
264264

265265
profile:
266-
desc: "Show CPU/RAM usage for mt-tauri and related processes"
267-
platforms: [linux]
266+
desc: "Show CPU/RAM usage for mt processes (dev + release)"
267+
platforms: [darwin, linux]
268268
cmds:
269269
- |
270-
procs=$(ps aux --no-headers | grep -E 'mt-tauri|mt_tauri|WebKit' | grep -v grep)
270+
case "{{OS}}" in
271+
darwin)
272+
procs=$(ps aux | grep -E '[m]t-tauri|/[m]t( |$)' || true)
273+
;;
274+
linux)
275+
procs=$(ps aux --no-headers | grep -E '[m]t-tauri|/[m]t( |$)|[W]ebKit' || true)
276+
;;
277+
esac
271278
if [ -z "$procs" ]; then
272-
echo "No mt-tauri processes found."
279+
echo "No mt processes found."
273280
exit 0
274281
fi
275282
echo "$procs" | awk '

0 commit comments

Comments
 (0)