Skip to content

Commit

Permalink
feat: add heaptrack to justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wash2 committed Nov 14, 2024
1 parent bd35742 commit 437cd83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
8 changes: 8 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 437cd83

Please sign in to comment.