comphead commented on code in PR #15481:
URL: https://github.com/apache/datafusion/pull/15481#discussion_r2020242855


##########
docs/source/library-user-guide/profiling.md:
##########
@@ -82,6 +82,43 @@ CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --root 
--bench sql_planner --
 
 [Video: how to CPU profile DataFusion with XCode 
Instruments](https://youtu.be/P3dXH61Kr5U)
 
-## Linux
+## Cross Platform
 
-## Windows
+There is an opportunity to build flamegraphs, call trees and stack charts on 
any platform using
+[Samply](https://github.com/mstange/samply)
+
+Install Samply
+
+```shell
+cargo install --locked samply
+```
+
+More [installation 
options](https://github.com/mstange/samply?tab=readme-ov-file#installation)
+
+Run the profiler
+
+```shell
+samply record --profile profiling ./my-application my-arguments
+```
+
+### Profile the benchmark
+
+[Set up 
benchmarks](https://github.com/apache/datafusion/blob/main/benchmarks/README.md#running-the-benchmarks)
 if not yet done
+
+Example: Profile Q22 query from TPC-H benchmark.
+Note: `--profile profiling` to profile release optimized artifact with debug 
symbols
+
+```shell
+cargo build --profile profiling --bin tpch
+samply record ./target/debug/tpch benchmark datafusion --iterations 5 --path 
datafusion/benchmarks/data/tpch_sf10 --prefer_hash_join true --format parquet 
-o datafusion/benchmarks/results/dev2/tpch_sf10.json --query 22

Review Comment:
   That is awesome catch



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to