Performance Analysis Using the Visual Studio Code Profilers

WEBINAR: On-demand webcast

How to Boost Database Development Productivity on Linux, Docker, and Kubernetes with Microsoft SQL Server 2017 REGISTER >

Introduction

Code profiling is dynamic program analysis for identifying performance problems, memory, and time complexity of a program, CPU utilization, and so forth. Profiling tools provide measurements of how long a method takes to execute, how often it is called, where it is called from, and how much of total time at is spent executing that method. By using profiling tools, a developer can view the state of the application, accumulate data about variable values, function calls, memory leaks and events traced during code debugging. Collected data from the profiling tool could be used for performance improvement during software development. Visual Studio 2017 supports the following list of tools for profiling and performance testing of your code.

Visual Studio Code Profiling Tools

NProfiler

NProfiler is an application profiler for .NET. It's an extremely fast and accurate performance profiler for any .NET application (both desktop and Web applications). NProfiler generates CPU usage, call tree of hit counts for all method calls and events, call lists to investigate the total performance impact of methods, line-by-line and statement results, CPU Time vs. Wall-Clock Time, examine processes and threads, and the like. Using NProfiler developer can save profiler results for later comparison.

Performance and Diagnostics Hub

The Diagnostic Tools are integrated with Visual Studio. During debugging, a developer can view CPU usage, memory usage, take snapshots, and time sections of code.

AQtime

AQtime is a performance measurement tool designed to help developers track down memory profiling issues, CPUusage, and other I/O bottlenecks. It is used for multiple optimization tasks to improve application performance, optimize memory usage, measure code coverage, and test fault tolerance. AQtime can work as a standalone performance profiler, or can be integrated into Microsoft Visual Studio to improved productivity. Its key features are measurement of app health accurately, application performance profiling, memory profiling, code coverage analysis, runtime fault injection, and so forth.

AMD CodeXL

CodeXL is an open source tool suite that performs GPU debugging, CPU profiling, graphics frame analysis, and has a static shader/kernel analyzer. CodeXL increases developer productivity by identifying programming errors and performance issues in your application quickly and easily.

It's available in both Windows® and Linux® platforms and could be easily integrated with Visual Studio as an extension. Developers can also download the source code and install it.

dotTrace

dotTrace helps developers detect performance bottlenecks of .NET applications. dotTrace provides an extension for Visual Studio integration. It analyzes all performance issues of your application. dotTrace profiles SQL queries, HTTP requests, .NET applications, static methods, and unit tests. By using dotTrace, you also can view performance timelines and analyze call stacks. Performance data generated by dotTrace can be analyzed by using slice and dice methods, filters, call trees, and diagrams.

If you use the dotTrace extension integrated with Visual Studio, it helps you start profiling the applications from the IDE. You also can view and analyze timeline profiling results right in Visual Studio.

ANTS

ANTS is a leading .NET performance profiler. It helps developers rapidly optimize performance.

ANTS Performance Profiler can profile a .NET desktop, ASP.NET, Windows services, COM+ server applications, Silverlight applications, XBAPs, and MVC applications. ANTS supports all .NET languages, including Visual Basic .NET, C#, and managed C++. ANTS also can analyze database activities in the call tree with code performance data.

JustTrace

JustTrace is a tool for .NET developers that gathers and analyses performance and memory usage data of various types of applications. It helps developers optimize performance, reduce memory usage, fix memory leaks, and so on. JustTrace offers seamless integration with Visual Studio by using an extension.

Clr Heap Allocation Analyzer

Clr heap can detect most heap allocations including explicit allocations and value type to reference type (boxing). It's tightly integrated with the Visual Studio IDE using an extension.

Conclusion

Profiling your .NET code is a very important task in ensuring that your application performs as expected. Profiling tools gather information about an executing program, allowing you to determine those improvements that are required in your application.



About the Author

Tapas Pal

I am working in Microsoft Technology for last 15 years and presently working with Cognizant Technology Solutions, India as Senior Architect. I have completed TOGAF 9.1,Microsoft Certification on .NET 1.1 , .NET 2.0, SQL Server 2005 and Sharepoint. Please visit my Blog - http://tapas-pal.blogspot.com/

Related Articles

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date