summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-06-04 13:35:42 +0200
committerStefan Haller <stefan@haller-berlin.de>2024-06-04 15:37:59 +0200
commitffedd84e9244f543f35e3211b85dd499af9af135 (patch)
treef5b50662ab3e4e6e631fb16620f5d98f06c88eef /CONTRIBUTING.md
parentab0b0da850f7a1caaf16d7e49460c7868cc90d92 (diff)
Add some developer documentation about profiling
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md26
1 files changed, 1 insertions, 25 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 861c7fd35..a65297f4a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -154,31 +154,7 @@ If you want to trigger a debug session from VSCode, you can use the following sn
## Profiling
-If you want to investigate what's contributing to CPU usage you can add the following to the top of the `main()` function in `main.go`
-
-```go
-import "runtime/pprof"
-
-func main() {
- f, err := os.Create("cpu.prof")
- if err != nil {
- log.Fatal("could not create CPU profile: ", err)
- }
- defer f.Close()
- if err := pprof.StartCPUProfile(f); err != nil {
- log.Fatal("could not start CPU profile: ", err)
- }
- defer pprof.StopCPUProfile()
- ...
-```
-
-Then run lazygit, and afterwards, from your terminal, run:
-
-```sh
-go tool pprof --web cpu.prof
-```
-
-That should open an application which allows you to view the breakdown of CPU usage.
+If you want to investigate what's contributing to CPU or memory usage, see [this separate document](docs/dev/Profiling.md).
## Testing