ASP.NET MVC应用程序分析

问题描述:

我是一个初级开发人员,我被分配到找出为什么Web应用程序缓慢的当前请求需要8秒钟,但我不知道如何开始来分析如何找出发生了什么事情的SQL服务器上,其功能需要很多时间。该应用程序是用ASP.NET MVC 5,使用实体框架6.我应该从哪里开始呢?

I'm a junior developer and I was assigned to find out why web applications slow current request takes about eight seconds, but I do not know how to begin to profile how to find out what's going on SQL server, which functions takes a lot of time. The application is written in ASP.NET MVC 5 and uses Entity Framework 6. Where should I start?

如果你不是一个数据库男孩喜欢我,你一定会喜欢使用一瞥。

If you're not a database boy like me, you'll love using Glimpse.

一瞥是幅材的诊断平台

提供实时诊断和放大器;见解几十万的开发者每天。

Providing real time diagnostics & insights to the fingertips of hundreds of thousands of developers daily.

所以,你可以从抓住的NuGet管窥启动。

So you can start by grabbing Glimpse from NuGet.

PM> Install-Package Glimpse.MVC5

PM> Install-Package Glimpse.EF6

初​​始配置如下:

Initial configuration is the following:


  • 在configSections:


  • 在这之后:

抱歉的,但我浪费10分钟尝试添加XML code /报价/一切。
对于进一步的配置和其他人,在这里: http://getglimpse.com/Docs/Configuration

Sorry for that but i waste 10 minutes trying to add xml code/quote/everything. For further configuration and others, here: http://getglimpse.com/Docs/Configuration

之后,你必须导航到/glimpse.axd还是你有指定的路径是什么,并启用(这是一个cookie)。

After that you must navigate to /glimpse.axd or what path did you specified there and enable (it's a cookie).

下面是使用掠影所以你可以看到什么让你的网站。呈现视图时间/线时间/ SQL的时间/ AJAX分析及放大器;等..
http://play.getglimpse.com/

Here is a site that is using Glimpse so you can see what's giving to you. Render view time/wire time/sql time/ajax profiling & so on.. http://play.getglimpse.com/

这是非常具有可扩展的插件等。你可以搜索。

It is very extensible having plugins and so on. You can search.

这里是一个谈话,你可以看审查的一些功能,并说服你使用一瞥:的 https://www.youtube.com/watch?v=IGMYogdKYyw

And here is a talk that you can watch for reviewing some features and to convince you to use glimpse: https://www.youtube.com/watch?v=IGMYogdKYyw

如果你只需要看到的SQL查询不整(渲染处理等),您可以preSS一瞥圈,去到SQL标签。你必须像下面这样一个观点:

And if you need to see ONLY the sql queries not the whole (rendering process etc.) you can press the glimpse circle and go to the sql tab. You'll have a view like the following: