Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
comphead committed Mar 20, 2024
1 parent 82dba7c commit e4a03d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/source/library-user-guide/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@ Instead, edit dev/update_config_docs.sh or the docstrings in datafusion/core/src

The section contains examples how to perform CPU profiling for Apache Arrow DataFusion on different operating systems.


## MacOS

### Building a flamegraph

- [cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph)
Example:
Example:

```bash
CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --root --unit-test datafusion -- dataframe::tests::test_xxx
```

Open SVG file with the browser

- dtrace with DataFusion CLI

```bash
git clone https://github.com/brendangregg/FlameGraph.git /tmp/fg
cd datafusion-cli
Expand All @@ -49,6 +50,7 @@ echo "select * from table;" >> test.sql
sudo dtrace -c './target/debug/datafusion-cli -f test.sql' -o out.stacks -n 'profile-997 /execname == "datafusion-cli"/ { @[ustack(100)] = count(); }'
/tmp/fg/FlameGraph/stackcollapse.pl out.stacks | /tmp/fg/FlameGraph/flamegraph.pl > flamegraph.svg
```

Open SVG file with the browser

### CPU profiling
Expand All @@ -58,4 +60,3 @@ Open SVG file with the browser
## Linux

## Windows

0 comments on commit e4a03d5

Please sign in to comment.