Live code profiling provides a breakdown of the most frequent functions and methods in a transaction. The level of detail varies by language, but typically includes information down to the class, method, and even filename and line number. It provides enough detail to understand what line of code is causing a performance issue, and includes the information needed to quickly find the relevant section in the source code.
This works by automatically collecting statistical profiling data, referred to as snapshots, associated with a transaction, where the library takes stack traces at a set interval as the transaction is processed. On finish, the reported snapshots are analyzed to build a tree of call paths for the corresponding trace, which shows the frequency of occurrence of each frame in that path.
The interval at which the library takes stack traces can be changed. The shorter the interval, the more accurate the call paths will be. However, a short interval also affects application performance and generates more data which increases bandwidth usage, so intervals shorter than the default 20ms (supported by some libraries) should be used with caution.
Traces with duration shorter than the profiling interval might not have profiling information.
Code profiling is disabled by default. See the links below to enable it in the supported libraries:
See the links below for library-specific troubleshooting and factors that should be considered when using code profiling:
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.