Skip to content

Commit 9587098

Browse files
committed
Documentation only, remove script
1 parent 57ce526 commit 9587098

File tree

3 files changed

+3
-66
lines changed

3 files changed

+3
-66
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,8 @@ To profile a test script and generate a flame graph, follow these steps:
467467
```bash
468468
pip install py-spy
469469
```
470-
2. Inside your test script, perform any required setup and then loop over the code you want to profile for improved sampling
471-
3. Run the `flamegraph` justfile target to generate a `.svg` file containing the flame graph:
472-
```bash
473-
just flamegraph <output_name=profile> <sample_rate=2000> <path/to/script>
474-
```
470+
2. Inside your test script, perform any required setup and then loop over the code you want to profile for improved sampling.
471+
3. Run `py-spy record -o <output.svg> -r <sample_rate=100> -- python <path/to/script>` to generate a `.svg` file containing the flame graph.
472+
(Note: on macOS you will need to run this command using `sudo` to allow `py-spy` to attach to the Python process.)
475473
4. If you need to include native code (for example the C extensions), profiling should be done on a Linux system, as macOS and Windows do not support the `--native` option of `py-spy`.
476474
Creating an ubuntu Evergreen spawn host and using `scp` to copy the flamegraph `.svg` file back to your local machine is the best way to do this.

justfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ setup-tests *args="":
6868
teardown-tests:
6969
bash .evergreen/scripts/teardown-tests.sh
7070

71-
flamegraph *args:
72-
bash tools/generate_flamegraph.sh {{args}}
73-
7471
[group('server')]
7572
run-server *args="":
7673
bash .evergreen/scripts/run-server.sh {{args}}

tools/generate_flamegraph.py

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)