Profiling¶
Profiling continuously samples and collects data on application runtime status across CPU, memory, and I/O, automatically obtaining performance profiling data. The collected data is visualized in real time through flame graphs, clearly showing the call stack relationships and resource consumption proportions among methods, classes, and threads. This helps developers identify hot functions and efficiency bottlenecks, providing data support for code-level performance optimization.
In the Profiling Explorer, you can:
-
Analyze runtime dynamic performance data of applications in different languages such as Java, Python, Go, and C/C++ based on flame graphs, and intuitively locate performance issues caused by inefficient algorithms, memory leaks, or improper I/O operations;
-
Correlate with traces to obtain the code execution segments corresponding to specific business requests (Spans), enabling end-to-end performance tracing from business interfaces to specific methods and precisely locating optimization directions.
Prerequisites¶
After Profiling data is reported, you can query and analyze it in the Explorer, with support for search filtering, quick filtering, column customization, and data export.
Using the top Workspace selector, you can query Profile data from multiple authorized workspaces in the same site. When opening a specific record, Profile file, or flame graph, the source workspace of that record is used. For authorization conditions and restrictions, see Cross-workspace Query Instructions.
Note
Profiling data is retained for 7 days by default.
Profiling Details Page¶
When you enter this page from the associated details in Session Replay, you can return to the previous level to continue analysis.
Performance¶
On the details page, the Performance tab opens automatically, containing attribute tags, a performance flame graph, and runtime information.
If the current Profile file exceeds 20 MB, online parsing is not supported. You can download the file to your local machine and view it with professional analysis tools, for example:
Flame Graph¶
The core of Profiling is code-level performance analysis using flame graphs. Flame graphs intuitively show the execution time or resource consumption distribution of each method in the call stack. The system also provides aggregated data analysis views based on multiple dimensions such as method, class library, and thread, directly listing the hottest methods with the highest execution proportions, helping you quickly focus on core performance issues.
Analysis capabilities support multiple programming languages, and the observable metric dimensions vary by language, for example:
| Category | Description |
|---|---|
| CPU Time | CPU runtime of each method |
| Wall Time | Total time spent by each method, including CPU time, I/O wait time, and any other time spent while the function is running |
| Heap Live Size | Amount of heap memory still in use |
| Allocated Memory | Amount of heap memory allocated by each method, including allocations later released |
| Allocations | Number of heap allocations made by each method, including allocations later released |
| Thrown Exceptions | Number of exceptions thrown by each method |
| Lock Wait Time | Time each function spends waiting for locks |
| Locked Time | Time each function holds locks |
| Lock Acquires | Number of times each method acquires locks |
| Lock Releases | Number of times each method releases locks |
| Category | Description |
|---|---|
| CPU Time | CPU runtime of each method, including the time spent on Java bytecode and runtime operations of the service, excluding the time spent calling native code through the JVM |
| Wall Time in Native Code | Number of samples collected in native code. Sampling can occur while the code runs on the CPU, waits for I/O, or during any other event that happens while the method is running. This does not include Java bytecode calls involved in running application code |
| Allocations | Number of heap allocations made by each method, including allocations later released |
| Allocated Memory | Amount of heap memory allocated by each method, including allocations later released |
| Heap Live Objects | Number of live objects allocated to each method |
| Thrown Exceptions | Number of exceptions thrown by each method |
| Lock Wait Time | Time each method spends waiting for locks |
| Lock Acquires | Number of times each method acquires locks |
| File I/O Time | Time each method spends reading from and writing to files |
| File I/O Written | Amount of data written to files by each method |
| File I/O Read | Amount of data read from files by each method |
| Socket I/O Read Time | Time each method spends reading from sockets |
| Socket I/O Write Time | Time each method spends writing to sockets |
| Socket I/O Read | Amount of data read from sockets by each method |
| Socket I/O Written | Amount of data written to sockets by each method |
| Synchronization | Time each method spends on synchronization |
Quick Actions¶
- Search: In the Type selector, enter a method name keyword for fuzzy search and select directly from the matching results to quickly locate and focus on a specific method;
- Copy: Under Dimension, hover to copy and view method details;
- Click to select: The Dimension list shows all methods by default. Click any method, and the flame graph will focus on the call path of that method. Multi-select is supported to compare the execution of multiple methods. Click a selected method again to deselect it and restore the full view.
Runtime Information¶
On the Runtime Information tab, you can view associated fields and tag attributes of the corresponding programming language runtime, including process arguments, environment variables, and system tags. You can add any tag as a filter to the Explorer list panel to quickly filter related data, or directly copy tag content for correlated queries in logs or traces.
Correlating Profiling with Traces¶
When an application has both APM distributed tracing and Profiling collection enabled, the system supports correlating profiling data at the trace level. In the Trace Details page of Application Performance Monitoring (APM), select any Span in the flame graph to view the list of correlated code method calls during the execution period of that business request, along with their Wall Time proportions.
This enables drill-down analysis from a single slow business request directly to the specific time-consuming methods, and supports one-click navigation to the full Profiling details page to view more comprehensive profiling data for that time period (such as CPU and memory dimensions), for in-depth root cause investigation.
Click View Profiling Details to jump to the corresponding Profiling details page and view specific performance data.

