my-vegetable-has-exploded commented on issue #8492:
URL: 
https://github.com/apache/arrow-datafusion/issues/8492#issuecomment-2016355077

   > 
![df-distinct-graph](https://private-user-images.githubusercontent.com/10247224/290721703-6fe4587d-b311-4a2f-adcd-9ffdecbf7934.svg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTExNzA1NzgsIm5iZiI6MTcxMTE3MDI3OCwicGF0aCI6Ii8xMDI0NzIyNC8yOTA3MjE3MDMtNmZlNDU4N2QtYjMxMS00YTJmLWFkY2QtOWZmZGVjYmY3OTM0LnN2Zz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzIzVDA1MDQzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5OTE4ZjNkMWI3OTQ5MWZkY2E0NjI1ZjcwMmY1ZjU4YzI1NTc1ZTlkYjE4MjIyZjIxYTI0N2E0MWYwMjZhYmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gDdXyK9-USVP81YDFSxVyZo4AjGPCh_kQ8huHu-QK04)
 Attaching Flamegraph for the query
   > 
   > ```
   > SELECT COUNT(*) FROM '*.parquet' WHERE
   >     ARRAY_LENGTH(
   >       REGEXP_EXTRACT_ALL(path, 
'\.(asm|c|cc|cpp|cxx|h|hpp|rs|[Ff][0-9]{0,2}(?:or)?|go)$')
   >     ) > 0;
   > ```
   
   Hi, could you share the method to draw the flamegraph? 
   
   There is a large "unknown" in my flame graph, which prevents me from 
tracking the function call chain.
   
   
![图片](https://github.com/apache/arrow-datafusion/assets/48236141/81e3ad20-07d5-429a-9ff2-4de6dcf58d7c)
   
   Here is my shell to generate the flamegraph using `datafusion-cli`.
   
   ```shell
   #!/bin/bash
   PERF_DATA_FILE="$1"
   ../../datafusion-cli/target/debug/datafusion-cli -f repro-range-query.sql &
   # datafusion-cli -f repro-range-query.sql &
   PID=$!
   # use perf to collect data
   sudo /usr/bin/perf_5.15 record --call-graph=dwarf -e cpu-clock -F 100 -p 
$PID -- sleep 30
   sudo /usr/bin/perf_5.15 script -i perf.data >"perf.unfold"
   FLAMEGRAPH_DIR="/home/deepin/sdk/FlameGraph"
   "$FLAMEGRAPH_DIR/stackcollapse-perf.pl" "perf.unfold" >"perf.folded"
   
   "$FLAMEGRAPH_DIR/flamegraph.pl" "perf.folded" >"$1.svg"
   
   rm "perf.unfold" "perf.folded"
   echo "Flame graph SVG created: $1.svg"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to