You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/library-user-guide/profiling.md
+24-10
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,6 @@
21
21
22
22
The section contains examples how to perform CPU profiling for Apache DataFusion on different operating systems.
23
23
24
-
## MacOS
25
-
26
24
### Building a flamegraph
27
25
28
26
[Video: how to CPU profile DataFusion with a Flamegraph](https://youtu.be/2z11xtYw_xs)
@@ -34,31 +32,47 @@ in images such as this:
34
32
35
33

36
34
37
-
To create a flamegraph, you need to install the `flamegraph` tool:
35
+
## MacOS
36
+
37
+
#### Step 1: Install the flamegraph Tool
38
+
39
+
To install flamegraph, run:
38
40
39
41
```shell
40
42
cargo install flamegraph
41
43
```
42
44
43
-
Then you can run the flamegraph tool with the `--` separator to pass arguments
44
-
to the binary you want to profile.
45
+
#### Step 2: Prepare Your Environment
46
+
47
+
Ensure that you're in the directory containing the necessary data files for your DataFusion query. The flamegraph tool will profile the execution of your query against this data.
48
+
49
+
#### Step 3: Running the Flamegraph Tool
50
+
51
+
To generate a flamegraph, you'll need to use the -- separator to pass arguments to the binary you're profiling. For datafusion-cli, you need to make sure to run the command with sudo permissions (especially on macOS, where DTrace requires elevated privileges).
0 commit comments