Skip to content

Profiling


Profiling supports automatically obtaining the usage of CPU, memory, and I/O during the application runtime. It displays in real-time the call relationships and execution efficiency of each method, class, and thread through flame graphs, helping to optimize code performance.

In the Profiling Explorer, you can:

  • Analyze dynamic performance data of applications running under different language environments such as Java, Python, Go, and C/C++ using flame graphs from Profiling. You can intuitively view performance issues related to CPU, memory, and I/O;
  • Obtain code execution snippets associated with Spans related to traces through linked traces, enabling method-level code performance tracking, helping developers discover directions for code optimization.

Prerequisites

  1. Install DataKit;
  2. Enable the Profiling collector.

Query and Analysis

After Profiling data is reported to the Guance workspace, you can understand your program's code performance through the Profiling real-time data explorer. It supports querying and analyzing Profiling data, including search and filtering, quick filtering, adding display columns, and exporting data.

For more details, refer to Explorer Description.

Note: Profiling data is retained by default for 7 days.

Profiling Performance Analysis

Clicking on the Profiling list allows you to view corresponding performance details, which include property labels, performance flame graphs, and runtime information.

Flame Graphs and Dimensional Data Analysis

Profiling uses flame graphs to analyze the usage of CPU, memory, or IO at the code method level under different types, allowing you to intuitively understand the execution performance and invocation of methods. Additionally, Profiling provides analysis of execution data based on dimensions such as methods, libraries, threads, etc., more clearly displaying some methods with higher execution ratios, enabling faster identification of performance issues.

Category Description
CPU Time The run time of each method on the CPU.
Wall Time The total elapsed time of each method, including time spent running on the CPU, waiting for I/O, and any other things that happen while the function runs.
Heap Live Size The amount of heap memory still in use.
Allocated Memory The amount of heap memory allocated by each method, including allocations that were later freed.
Allocations The number of heap allocations made by each method, including those that were later freed.
Thrown Exceptions The number of exceptions thrown by each method.
Lock Wait Time The time each function spends waiting for locks.
Locked Time The time each function holds locks.
Lock Acquires The number of times each method acquires locks.
Lock Releases The number of times each method releases locks.

Category Description
CPU Time The run time of each method on the CPU, including service Java bytecode and runtime operation timing, excluding time spent calling native code via JVM.
Wall Time in Native Code The sampling count of native code. When code runs on the CPU, waits for I/O, and anything else happens while the method runs, sampling may occur. This does not include Java bytecode calls involved in running application code.
Allocations The number of heap allocations made by each method, including those that were later freed.
Allocated Memory The amount of heap memory allocated by each method, including allocations that were later freed.
Heap Live Objects The number of live objects allocated to each method.
Thrown Exceptions The number of exceptions thrown by each method.
Lock Wait Time The time each method spends waiting for locks.
Lock Acquires The number of times each method acquires locks.
File I/O Time The time each method spends reading from and writing to files.
File I/O Written The amount of data written to files by each method.
File I/O Read The amount of data read from files by each method.
Socket I/O Read Time The time each method spends reading from sockets.
Socket I/O Write Time The time each method spends writing to sockets.
Socket I/O Read The amount of data read from sockets by each method.
Socket I/O Written The amount of data written to sockets by each method.
Synchronization The time each method spends synchronizing.

Quick Operations

  • Search: You can perform a fuzzy search by entering keywords in the selection box to the right of Type. The selection box will list matching methods, allowing you to directly choose the one you need to view.
  • Copy: You can hover over Dimensions with your mouse to copy and view method details.
  • Click Select: Dimensions are selected by default. You can click to view one or multiple methods and their related flame graph information. Clicking a method again restores full selection.

Runtime Information

In the Profiling Details page, clicking Runtime Information allows you to view some runtime information and label properties corresponding to the programming language. You can add label information to the explorer list for filtering purposes or copy label content for query searches.

Trace Correlation with Profiling

When the application uses the ddtrace collector and both APM trace monitoring and Profiling performance tracking data collection are enabled simultaneously, Guance offers Span-level correlation viewing and analysis. On the trace details page of Application Performance Monitoring, selecting a Span in the flame graph retrieves hot code information corresponding to the selected time period. You can directly view the list of code methods called during this period and the execution time and proportion of Wall Time. In the method list, you can recursively view the order of method calls and their execution times.

Clicking View Profiling Details redirects you to the corresponding Profiling details page to view specific performance data.

Feedback

Is this page helpful? ×