feat: add heaptrack to justfile

This commit is contained in:
Ashley Wulber 2024-11-14 11:20:56 -05:00 committed by Ashley Wulber
parent bd35742a8f
commit 437cd831b9
2 changed files with 12 additions and 0 deletions

View file

@ -37,6 +37,10 @@ git = "https://github.com/smithay/client-toolkit/"
package = "smithay-client-toolkit"
# rev = "c583de8"
[profile.release-with-debug]
inherits = "release"
debug = true
[profile.release]
lto = "thin"

View file

@ -137,6 +137,14 @@ uninstall:
find 'resources'/'default_schema' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} rm -rf {{default-schema-target}}/{}
find 'resources'/'icons' -type f -exec echo {} \; | rev | cut -d'/' -f-3 | rev | xargs -d '\n' -I {} rm {{iconsdir}}/{}
heaptrack *args:
#!/usr/bin/env bash
set -ex
rm -fv heaptrack.cosmic-settings.*
cargo heaptrack --profile release-with-debug --bin cosmic-settings -- {{args}}
zstd -dc < heaptrack.cosmic-settings.*.raw.zst + /usr/lib/heaptrack/libexec/heaptrack_env | zstd -c > heaptrack_env.cosmic-settings.zst
heaptrack_gui heaptrack.cosmic-settings.zst
# Dependencies
cmd-depends := "
cargo