The profiling feature use to identify the code and all various elements that causes to slow SharePoint applications performance. Profiling feature observes & records the performance behavior of SharePoint application. Profiling eliminates the problems that cause to slow SharePoint applications performance such as memory allocation issues, bottlenecks, inefficient code etc. Visual Studio provides several profiling tools in the integrated development environment to identify SharePoint application performance issues.
Profiling Tools use five methods to collect SharePoint applications performance data. Here is the overview of five methods:
When you run profiling feature, it has very less impact on the application methods execution. Sampling profiling method collects statistical data that is performed by an SharePoint application.
It is set as a default in Microsoft Visual Studio Premium Profiling Tools. Here are all advantages of this method:
- Initial explorations of SharePoint Application Performance
- Investigating SharePoint Application performance issues that affect the utilization of the processor.
This method interrupts the computer processor at the set time intervals and collects the function call stack.
This method covers two parts- First is Exclusive sample counts that are incremented for the executing function & the second is inclusive counts that are incremented for all function call stack.
Sampling Profiling reports covers these counts total for the profiled module, function etc.
The instrumentation profiling method collects function timing calls in a profiled SharePoint application. Here are all advantages of this method:
- Investigating input/output bottlenecks
- Examination of a particular module
- Examination of set of functions
The instrumentation method collects function timing information in the instrumented file by injecting code in a binary file. Instrumentation reports cover four values to represent the total function timing:
Elapsed Inclusive - The total spent time on function execution.
Application Inclusive - The total spent time on function execution. but exclude OS calls time.
Elapsed Exclusive - The total spent time on code execution in the body of the function. But exclude the total spent time on functions execution called by the function.
Application Exclusive - The total spent time on code execution in the body of the function. But exclude the total spent time on functions execution & executing calls to the operating system called by the function.
Concurrency profiling collects multithreaded applications information & also about how your multithreaded application interacts with the hardware & the OS. Concurrency reports cover two values such as:
- Resource contention reports show total number of contentions and the total waiting time for a resource for the modules, functions, source code lines, and instructions.
- The concurrency visualizer displays graphical information to locate performance bottlenecks, CPU underutilization, areas of overlapped I/O, and many other information.
The .NET memory allocation profiling method interrupts the processor at each allocation of a .NET Framework object in a profiled application. It collects the information about the type, size, and number of objects that were created in an allocation.
- This profiler collects the additional information about the function call stack after an allocation event occurs. This method covers two parts- First is Exclusive allocation counts that are incremented for currently executing function. Second is inclusive counts that are incremented for all function call stack .
.NET reports cover the totals of these counts for the profiled types, modules, functions, source code lines, and instructions.
- This profiler collects information about destroyed objects data and information about the objects in each garbage collection generation when a garbage collection occurs. Then the profiler records objects data that were not explicitly destroyed.
The Object Lifetime report displays the totals for each type that was allocated in the profiling run.
We can use this method in both sampling and instrumentation mode. The Allocation and Object Lifetime reports should be same even you will select any mode:
After running .NET memory profiling in sampling mode the profiler .NET uses memory allocation events as the interval.
In the reports, it shows the number of allocated objects & the total allocated bytes with the inclusive and exclusive values.
After running .NET memory profiling in instrumentation mode, all detailed timing information is collected together with the inclusive and exclusive allocation values.
Tier-interaction profiling method collects information about synchronous ADO.NET calls between an ASP.NET page and a SQL Server database to a profiling data file. This data covers the number and time of calls, and the max & min times.
When you completed running a profile analysis on your application then a report provides detailed information about the application performance that I have already mentioned in all methods. Let take a detailed overview about reporting.
More About Profiling Tools Report:
You can view, analyze and manage SharePoint application performance issues in Performance Report windows.
You can view your data in various formats. You can check each view on the main toolbar of the Performance Report window. For this click the arrow next to the Current View to check the individual views.
Here is the list of data views:
Summary View: In this view, profiling data is displayed in the Summary view.
Caller View: In this view, profiling data is displayed in the call tree for a single function. It covers three points: Target Function, function called by callers & the function called by callees.
Call Tree View: In this view, profiling data is displayed function execution paths.
Process View: In this view, profiling data is displayed performance data for each process.
Modules View: In this view, profiling data is displayed for each module.
Functions View: In this view, you can view lists of the functions.
Line View: In this view, profiling data is displayed in the specific source code lines.
Instruction Pointer View: In this view, you can view the specific instructions.
Allocation View: In this view, you can view the lists of .NET objects that were allocated by the application.
Objects Life Time View: In this view, you can view the total number of instances of each type.
You can easily use this feature to fast your SharePoint applications performance & can easily identify code and other elements that are affecting your SharePoint application performance.