-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add script for generating flamegraph
- Loading branch information
1 parent
6236ba9
commit f00352c
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
trap 'echo 4 | sudo tee /proc/sys/kernel/perf_event_paranoid ' EXIT SIGINT SIGTERM | ||
|
||
if ! command -v jq; then | ||
cargo install jq | ||
fi | ||
if ! command -v flamegraph; then | ||
cargo install flamegraph | ||
fi | ||
if ! command -v perf; then | ||
sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r` | ||
fi | ||
echo 2 | sudo tee /proc/sys/kernel/perf_event_paranoid | ||
|
||
gcloud storage cat gs://committer-testing-artifacts/23ffcf5/committer_flow_inputs.json | jq -r .committer_input | CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph -- commit | ||
|
||
echo 4 | sudo tee /proc/sys/kernel/perf_event_paranoid |