This is an automated email from the ASF dual-hosted git repository.

zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new 197e4f66d [#1407] chore(rust): add cpu profile doc (#1515)
197e4f66d is described below

commit 197e4f66d0ae019da70c034f59bcf6f61b511751
Author: Junfan Zhang <[email protected]>
AuthorDate: Fri Feb 16 11:12:59 2024 +0800

    [#1407] chore(rust): add cpu profile doc (#1515)
    
    ### What changes were proposed in this pull request?
    
    add cpu profile doc
    
    ### Why are the changes needed?
    
    Subtask for  #1407
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Needn't
---
 rust/experimental/server/README.md | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/rust/experimental/server/README.md 
b/rust/experimental/server/README.md
index 73e88da0f..7c83cc924 100644
--- a/rust/experimental/server/README.md
+++ b/rust/experimental/server/README.md
@@ -169,4 +169,20 @@ HADOOP_CONF_DIR=/etc/hadoop/conf 
KRB5_CONFIG=/etc/krb5.conf KRB5CCNAME=/tmp/krb5
 2. Start with profile
     ```shell
     _RJEM_MALLOC_CONF=prof:true,prof_prefix:jeprof.out ./uniffle-worker
-    ```
\ No newline at end of file
+    ```
+   
+### CPU Profiling
+1. build with jemalloc feature
+    ```shell
+    cargo build --release --features jemalloc
+    ```
+2. Paste following command to get cpu profile flamegraph
+    ```shell
+    go tool pprof -http="0.0.0.0:8081" 
http://{remote_ip}:8080/debug/pprof/profile?seconds=30
+    ```
+   - localhost:8080: riffle server.
+   - remote_ip: pprof server address.
+   - seconds=30: Profiling lasts for 30 seconds.
+   
+   Then open the URL <your-ip>:8081/ui/flamegraph in your browser to view the 
flamegraph:
+   
\ No newline at end of file

Reply via email to