Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-15 15:09:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-15 15:09:26 +0300
commit9215d9f7619929f9da16744fa37636635b66949b (patch)
tree754fa5c3a99700176b117d96b30268cbd3c07581 /doc/development/performance.md
parenta898b6057ecf9ab635c45217568d44eab5c32ec0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/performance.md')
-rw-r--r--doc/development/performance.md21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/development/performance.md b/doc/development/performance.md
index 2841a7c339a..b33fc8b246f 100644
--- a/doc/development/performance.md
+++ b/doc/development/performance.md
@@ -173,11 +173,30 @@ dot -Tsvg project_policy_spec.dot > project_policy_spec.svg
To load the profile in [kcachegrind](https://kcachegrind.github.io/):
```shell
-stackprof tmp/project_policy_spec.dump --callgrind > project_policy_spec.callgrind
+stackprof tmp/project_policy_spec.rb.dump --callgrind > project_policy_spec.callgrind
kcachegrind project_policy_spec.callgrind # Linux
qcachegrind project_policy_spec.callgrind # Mac
```
+For flamegraphs, enable raw collection first. Note that raw
+collection can generate a very large file, so increase the `INTERVAL`, or
+run on a smaller number of specs for smaller file size:
+
+```shell
+RAW=true bin/rspec-stackprof spec/policies/group_member_policy_spec.rb
+```
+
+You can then generate, and view the resultant flamegraph. It might take a
+while to generate based on the output file size:
+
+```shell
+# Generate
+stackprof --flamegraph tmp/group_member_policy_spec.rb.dump > group_member_policy_spec.flame
+
+# View
+stackprof --flamegraph-viewer=group_member_policy_spec.flame
+```
+
It may be useful to zoom in on a specific method, for example:
```shell