aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/skylark/performance.md
diff options
context:
space:
mode:
authorGravatar laurentlb <laurentlb@google.com>2017-12-14 06:24:48 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-14 06:26:49 -0800
commit1b66574799a242b09f88a1b0cfe47a956f17fa87 (patch)
tree6dc994440b9a4f805ebc4932750da43200363b6d /site/docs/skylark/performance.md
parentfafeadd24518ed44b5f500c1439e0bbeb7118e62 (diff)
Move profiling information from the Overview to the Optimizing page.
RELNOTES: None. PiperOrigin-RevId: 179037412
Diffstat (limited to 'site/docs/skylark/performance.md')
-rw-r--r--site/docs/skylark/performance.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/site/docs/skylark/performance.md b/site/docs/skylark/performance.md
index 4538bfdb94..ac36888db8 100644
--- a/site/docs/skylark/performance.md
+++ b/site/docs/skylark/performance.md
@@ -179,6 +179,17 @@ ctx.actions.run(
)
```
+## Performance profiling
+
+To profile your code and analyze the performance, use the `--profile` flag:
+
+```
+$ bazel build --nobuild --profile=/tmp/prof //path/to:target
+$ bazel analyze-profile /tmp/prof --html --html_details
+```
+
+Then, open the generated HTML file (`/tmp/prof.html` in the example).
+
## Memory Profiling
Bazel comes with a built-in memory profiler that can help you check your rule's