Skip to content

Commit

Permalink
Add documentation for run benchmark under debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Jul 31, 2024
1 parent 65099a8 commit 5e9fe11
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/developers/contributing/performance/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ of time since building napari can be a time consuming task:
asv run -E existing -b ViewImageSuite
```

## Debugging a benchmark

To simplify run a benchmark in a debugger, you can use the command:

```bash
python -m pdb napari/_benchmarks/benchmark_file.py BenchmarkClass.benchmark_method
```

For example, to debug the ``time_set_view_slice`` method in the ``Image2DSuite``
benchmark, you can run:

```bash
python -m pdb napari/_benchmarks/benchmark_image_layer.py Image2DSuite.time_set_view_slice
```


## Comparing results to main

Often, the goal of a PR is to compare the results of the modifications in terms
Expand Down

0 comments on commit 5e9fe11

Please sign in to comment.