mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 07:15:41 -06:00
chore: add 'samply' profiling helper task to Justfile
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,3 +18,4 @@ coverage.html
|
|||||||
|
|
||||||
# Profiling output
|
# Profiling output
|
||||||
flamegraph.svg
|
flamegraph.svg
|
||||||
|
/profile.*
|
||||||
|
|||||||
7
Justfile
7
Justfile
@@ -5,6 +5,8 @@ set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
|
|||||||
# You can use src\\\\..., but the filename alone is acceptable too
|
# You can use src\\\\..., but the filename alone is acceptable too
|
||||||
coverage_exclude_pattern := "src\\\\app.rs|audio.rs|src\\\\error.rs|platform\\\\emscripten.rs"
|
coverage_exclude_pattern := "src\\\\app.rs|audio.rs|src\\\\error.rs|platform\\\\emscripten.rs"
|
||||||
|
|
||||||
|
binary_extension := if os() == "windows" { ".exe" } else { "" }
|
||||||
|
|
||||||
# !!! --ignore-filename-regex should be used on both reports & coverage testing
|
# !!! --ignore-filename-regex should be used on both reports & coverage testing
|
||||||
# !!! --remap-path-prefix prevents the absolute path from being used in the generated report
|
# !!! --remap-path-prefix prevents the absolute path from being used in the generated report
|
||||||
|
|
||||||
@@ -31,3 +33,8 @@ coverage:
|
|||||||
--output-path lcov.info \
|
--output-path lcov.info \
|
||||||
--profile coverage \
|
--profile coverage \
|
||||||
--no-fail-fast nextest
|
--no-fail-fast nextest
|
||||||
|
|
||||||
|
# Profile the project using 'samply'
|
||||||
|
samply:
|
||||||
|
cargo build --profile profile
|
||||||
|
samply record ./target/profile/pacman{{ binary_extension }}
|
||||||
|
|||||||
Reference in New Issue
Block a user