You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/09/24 12:29:52 UTC

[camel-performance-tests] 01/01: Added instructions on how to use the async profiler

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch async
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git

commit 482fb5522a1325029d20407d09379c01b6dd181a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Sep 24 14:29:21 2021 +0200

    Added instructions on how to use the async profiler
---
 profiling/kafka-minio-exchange-pooling/README.md | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/profiling/kafka-minio-exchange-pooling/README.md b/profiling/kafka-minio-exchange-pooling/README.md
index b9d4389..edcda32 100644
--- a/profiling/kafka-minio-exchange-pooling/README.md
+++ b/profiling/kafka-minio-exchange-pooling/README.md
@@ -75,6 +75,30 @@ and check the status
 docker exec -it <container_id> jcmd 1 JFR.check
 ```
 
+## Enabling Async Profiler 
+
+docker:
+```shell script
+docker run --rm -ti \
+    -v $PWD/data:/etc/camel:Z \
+    -v async_profiler_path:/work/async-profiler:Z \
+    -e CAMEL_K_CONF=/etc/camel/application.properties \
+    --network="host" \
+    quay.io/oscerd/kafka-minio-exchange-pooling:1.0-SNAPSHOT-jvm
+```
+
+Now you can start Async Profiler with the following command
+
+```
+docker exec -it <container_id> /work/async-profiler/profiler.sh -e alloc -d 30 -f /work/async-profiler/alloc_profile.html 1
+```
+
+This command while create an allocation flamegraph for the duration of 30 second of the running application.
+
+The privileged option for running the docker container is the fastest way to have perf events syscall enabled.
+
+If you don't want to use privileged approach, you can have a look at the basic configuration of async profiler (https://github.com/jvm-profiling-tools/async-profiler/wiki/Basic-Usage)
+
 ## Tuning Container
 
 You could also modify the resources of your container with memory and cpu defined while running it