Analyze Profiles

A profile, according to wikipedia, “is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls”. With that, a profiler is a program to generate such a profile for the purpose of immediate or later analysis.

In most instances, a profiler is used by developers to identify performance issues or bottlenecks in their code. Profilers are designed to enable developers to dig all the way down to the individual line of code that is running slow, or is resource intensive. As powerful as profiling can be to identify code optimization opportunities, it is often only used by developers in dev environments after there is already a serious issue. Even if a developer wanted to run profiling in production, it can be difficult at best to get access to production to get a profiler attached.

Instana AutoProfile™ attaches itself to the running process automatically with no restarts or reconfiguration required. With AutoProfile, users are able to continuously analyze code-level performance, discover bottlenecks in production code, visualize performance with a flame graph, and dig deep into the application’s ‘hot paths’.

To investigate profiles go to Unbounded Analytics view and then switch to "Profiles".

Continuously analyze code-level performance in production

profile processes

AutoProfile automatically and continuously profiles how your code runs in production, with no configuration required. AutoProfile is designed to uncover bottlenecks in your code and report CPU and contention profiles. CPU profiles allow developers to discover which method is CPU intensive so they can efficiently and precisely optimize their code. Contention profiles show which synchronized directives are causing long wait times, inefficient use of the CPU’s multithreading capabilities and leading to bad overall performance.

Visualize as a flame graph

flame graph

AutoProfile visualizes all profiles as a flame graph making it easy to see exactly where resources are being consumed. The flame graph bars are sized according to the amount of resources consumed. Additionally, the graph is ordered chronologically from the top down. Instana augments the profiles with valuable metrics like CPU usage and GC activity. To provide you with the context needed to understand the impact of the profile.

Find the ‘hot path’ in the tree view

hot path

Instana provides a tree view of all profiles, simply click on the plus sign to expand the area of interest. This makes it quick and easy to find the ‘hot path’ in your code. For example, you can quickly click on profiles to expand a path that shows you what code is using thirty percent of the total CPU usage so you can improve and optimize your code.

Dive in to the code (Java only)

dive in code

Open up the exact code that is causing the issue from either the flame graph or the tree view. You can filter by your package or class name to quickly find where your code starts in the code path. Simply click the link to dive directly into the line of code you need to focus on.

profiling code

Instana’s AutoProfile fits perfectly within Instana’s best-in-class performance optimization capabilities. AutoProfile and Unbounded Analytics™ provide developers with all of the information needed at their fingertips to immediately find the root cause of any issue or resource contention. This makes optimizing the performance of applications and services, to provide the best possible customer experience.