From 5c7cf52b25979df4ba77675caf02505294d6cda6 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 14 Nov 2024 09:28:28 -0700 Subject: [PATCH] Add just flamegraph target --- .gitignore | 2 ++ justfile | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 19f3d51..b90c476 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ /debian/cosmic-files.substvars /debian/cosmic-files/ /debian/files +/flamegraph.svg /heaptrack.* +/perf.* /target/ /test/ /vendor.tar diff --git a/justfile b/justfile index 6a0de7a..2abfbee 100644 --- a/justfile +++ b/justfile @@ -73,11 +73,15 @@ run *args: test *args: cargo test {{args}} +flamegraph *args: + cargo flamegraph --release --bin cosmic-files -- --no-daemon {{args}} + xdg-open flamegraph.svg + heaptrack *args: #!/usr/bin/env bash set -ex rm -fv heaptrack.cosmic-files.* - cargo heaptrack --profile release-with-debug --bin cosmic-files -- {{args}} + cargo heaptrack --profile release-with-debug --bin cosmic-files -- --no-daemon {{args}} zstd -dc < heaptrack.cosmic-files.*.raw.zst | /usr/lib/heaptrack/libexec/heaptrack_interpret | zstd -c > heaptrack.cosmic-files.zst heaptrack_gui heaptrack.cosmic-files.zst