-
Notifications
You must be signed in to change notification settings - Fork 90
Enable Memory & CPU Profiling for df_engine #2420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 20 commits
c294b16
062e1fb
f79dffd
1ab21be
8c6daa6
d23af0e
ad71e6b
7482d31
aebde81
cc9e748
9222922
6568f0d
a87c8fe
157f5ab
d73b21e
eed136f
34c417c
0ad845f
30b679a
a7c9240
12b6ba4
6e77031
37891c6
d95c7b7
b46664d
bba7248
64f7ec7
2af5ef7
8c9801b
7c28e45
3897c66
1720c5f
72377fb
42c08f2
6d6b315
8856edc
d9e0bfd
66f02a4
a9186cc
e533701
0358fa0
06111a1
ebdf8d4
cd8bf90
1b4185f
600d336
a6dad10
658e151
285883f
787bfa5
7c81041
7d2a092
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -384,6 +384,74 @@ | |
| docker build --build-context otel-arrow=../../ -f Dockerfile -t df_engine . | ||
| ``` | ||
|
|
||
| ## Profiling | ||
|
sapatrjv marked this conversation as resolved.
|
||
|
|
||
| This section covers Memory & CPU Profiling for df_engine using dhat-rs and | ||
| samply profilers respectively. | ||
|
|
||
| **Requirements**: | ||
|
|
||
| - dhat-rs <https://docs.rs/dhat/latest/dhat/> | ||
| - samply <https://github.com/mstange/samply> | ||
|
|
||
| **Installation**: | ||
|
|
||
| ```cmd/pwsh/bash | ||
| cargo install --locked samply | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| Note: dhat-rs is a library crate designed for heap profiling in Rust programs. | ||
| Hence it does not require explicit installation. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is not explicitly required, why would we want to document it under the "Requirements" section? |
||
|
|
||
| **Build**: | ||
|
|
||
| **Build for both CPU & Memory profiling**: | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```cmd/pwsh/bash | ||
| cargo build --profile profiling --no-default-features --features dhat-heap --workspace | ||
| ``` | ||
|
|
||
| **Build for only CPU profiling**: | ||
|
|
||
| ```cmd/pwsh/bash | ||
| cargo build --profile profiling --workspace | ||
| ``` | ||
|
|
||
| **Run**: | ||
|
|
||
| **Run with both Memory & CPU profiling enabled**: | ||
|
reyang marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```cmd/pwsh | ||
| samply record .\target\profiling\df_engine.exe --config .\configs\otap-noop.yaml | ||
| ``` | ||
|
Check failure on line 426 in rust/otap-dataflow/README.md
|
||
| or | ||
|
|
||
| ```bash | ||
| samply record ./target/profiling/df_engine --config ./configs/otap-noop.yaml | ||
| ``` | ||
|
|
||
| **Run with only Memory profiling enabled**: | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```cmd/pwsh | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
| .\target\profiling\df_engine.exe --config .\configs\otap-noop.yaml | ||
| ``` | ||
|
Check failure on line 437 in rust/otap-dataflow/README.md
|
||
| or | ||
|
|
||
| ```bash | ||
| ./target/profiling/df_engine --config ./configs/otap-noop.yaml | ||
|
reyang marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| **Result**: | ||
|
|
||
| On successful termination of df_engine.exe, it will generate dhat-heap.json file | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
| for Memory profiling that need to be rendered by uploading it to: | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
| <https://nnethercote.github.io/dh_view/>. | ||
|
|
||
| CPU profiling output will be automatically renderd on browser. | ||
|
sapatrjv marked this conversation as resolved.
Outdated
|
||
|
|
||
| Note: dhat needs a clean shutdown to generate dhat-heap.json file. In df_engine | ||
| this can be done manually with Ctrl-C. | ||
|
sapatrjv marked this conversation as resolved.
Outdated
sapatrjv marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Contributing | ||
|
|
||
| - [Contribution Guidelines](CONTRIBUTING.md) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.