Click here to Skip to main content
15,895,833 members
Articles / Programming Languages / C#
Tip/Trick

Glimpse Part 2 - Performance Profiler

Rate me:
Please Sign up or sign in to vote.
4.91/5 (29 votes)
7 Jan 2016CPOL2 min read 23.7K   15   4
This tip explains in a step by step manner as to how we can get performance detail for ASP.NET MVC application using Glimpse.

Introduction

Most of the current applications are being developed in Agile where a sprint consists of planning, development (each user story should meet DOD) and Testing. We, as developers, need to do actual development in a very short span of time in a sprint. This makes us focus on completing the functionality without focusing on its performance.

When application is almost near to completion & stable, then we realize the performance issues of application.

In this completion stage, we use different tools to figure out the performance issues and try to fix them. This causes us and our QA team to do redundant effort of fixing & testing the existing functionality.

To avoid the above issue, we should make performance factor as a part of our development by introducing a performance profiling tool like Glimpse.

Glimpse provides the debugging information as well as performance detail of web application.

I've already covered the basics of Glimpse and how can we use Glimpse into our application in my previous article: Glimpse Part 1 - Easy Debugging ASP.NET MVC Application

Here, I explain how we can use Glimpse as performance profiler.

Using Glimpse As Performance Profiler

Once we are done with Glimpse configuration into our application, we can get the performance detail on the same page. By enabling Glimpse, we can get this information in PROD environment also if required.

We have three different tabs which provide the execution time.

Timeline Tab

It provides performance detail with starting of request to end of request along with individual execution time for Filters, Controller, Actions, Result.

Image 1

Here, we can see that individual time is shown as below:

Controller: 561 ms , Connection Opened time: 403 ms, Command Execution : 40.94 ms

ActionResult Execution: 341 ms, View Rednder: 293 ms

SQL Tab

It provides execution time for DB query and total connection open time.

Image 2

Execution Tab

It also provides execution time for controller and action as below:

Image 3

Note: If we find any action taking time that is more than expected, then we can work on that part to optimize the performance.

Summary

By introducing Glimpse into our application during development, we can get these performance details on the same page without any extra effort and optimize accordingly.

History

This is about how we can trace the performance issues/details. And in my next article, "Optimize ASP.NET MVC Application Performance", I'll explain how we can optimize the overall application performance.

My other article:

http://www.codeproject.com/Articles/1052064/Tips-Optimize-ASP-NET-MVC-Application-Performance

 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Comments and Discussions

 
Praisenice article Pin
sweta_t278-Dec-15 9:04
sweta_t278-Dec-15 9:04 
GeneralMy vote of 5 Pin
ipec.anilgupta23-Nov-15 2:02
ipec.anilgupta23-Nov-15 2:02 
GeneralMy vote of 5 Pin
ipec.anilgupta23-Nov-15 1:52
ipec.anilgupta23-Nov-15 1:52 
GeneralRe: My vote of 5 Pin
Rakhi Shrivastava23-Nov-15 16:57
professionalRakhi Shrivastava23-Nov-15 16:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.