如何使用命令行调优ASP.NET网站代码(From MSDN)

news/2024/5/9 11:47:23/文章来源:https://blog.csdn.net/omage/article/details/39340447


原文出处: http://msdn.microsoft.com/en-us/library/ee308442(v=vs.110).aspx

命令行工具路径: c:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools\


非常实用的工具,可以帮助你判断ASP.NET网站程序代码的性能


Rapid Web Site Profiling with VSPerfASPNETCmd

Visual Studio 2012
Other Versions
This topic has not yet been rated Rate this topic

The VSPerfASPNETCmd command line tool enables you to easily profile ASP.NET Web applications. In comparison to the VSPerfCmd command line tool, options are reduced, no environment variables have to be set, and rebooting the computer is not required. Using VSPerfASPNETCmd is the preferred method for profiling with the standalone profiler. For more information, see How to: Install the Stand-Alone Profiler.

Note Note

Enhanced security features in Windows 8 and Windows Server 2012 required significant changes in the way the Visual Studio profiler collects data on these platforms. Windows Store apps also require new collection techniques. See Profiling Windows 8 and Windows Server 2012 applications.

In some scenarios, such as collecting concurrency data or pausing and resuming profiling, using VSPerfCmd is the preferred profiling method.

Note Note

Command-line tools of the Profiling Tools are located in the \Team Tools\Performance Tools subdirectory of the Visual Studio installation directory. On 64 bit computers,, use the VSPerfASPNETCmd tool located in the 32 bit \Team Tools\Performance Tools directory. To use the profiler command-line tools, you must add the tools path to the PATH environment variable of the command prompt window or add it to the command itself. For more information, see Specifying the Path to Profiling Tools Command Line Tools.

Profiling an ASP.NET Application

To profile an ASP.NET Web application, type one of the commands described in the following sections. The Web site is started and the profiler starts to collect data. Exercise your application and then close the browser. To stop profiling, press the Enter key in the command prompt window.

Note Note

By default, the command prompt does not return after a vsperfaspnetcmd command. You can use the /nowait option to force the command prompt to return. SeeUsing the /NoWait option.

To collect application statistics by using the sampling method

Sampling is the default profiling method of VSPerfASPNETCmd tool and does not have to be specified on the command line. The following command line collects application statistics from the specified Web application:

vsperfaspnetcmd websiteUrl

To collect detailed timing data by using the instrumentation method

Use the following command line to collect detailed timing data from a dynamically compiled ASP.NET Web application:

vsperfaspnetcmd /trace websiteUrl

If you want to profile statically compiled .dll files in your Web application, you must instrument the files by using the VSInstr command-line tool. The vsperfaspnetcmd /trace command will include data from the instrumented files.

To collect .NET memory data

The /Memory option collects data about the allocation of objects in .NET memory and can collect data about the lifetime of those objects. Allocation data collection is the default mode of the /Memory data option and does not have to be specified on the command line.

vsperfaspnetcmd /memory websiteUrl

Use the Lifetime parameter to collect object lifetime data in addition to the allocation data:

vsperfaspnetcmd /memory:lifetime websiteUrl

You can also use the /Trace option to include detailed timing information with the .NET memory data:

vsperfaspnetcmd /memory[:lifetime] /trace websiteUrl

To collect tier interaction data

Caution note Caution

Tier interaction profiling (TIP) data can be collected using Visual Studio Ultimate, Visual Studio Premium, or Visual Studio Professional. However, tier interaction profiling data can be viewed only in Visual Studio Ultimate and Visual Studio Premium.

To collect TIP data on Windows 8 or Windows Server 2012, you must use the the instrumentation (/trace) option.

To collect tier interaction data with sampling data:

vsperfaspnetcmd /tip websiteUrl

To collect tier interaction data with instrumentation data:

vsperfaspnetcmd /trace /tip websiteUrl

To collect tier interaction data with .NET memory data:

vsperfaspnetcmd /memory[:lifetime/tip websiteUrl

Using the /NoWait option

By default, the command prompt does not return after a vsperfaspnetcmd command. You can use the following syntax option to force the command prompt to return. You can then perform other operations in the command prompt window. To end profiling, use the /shutdown option in a separate vsperfaspnetcmd command.

To begin profiling:

vsperfaspnetcmd [/Options/nowait websiteUrl

To end profiling:

vsperfaspnetcmd /shutdown websiteUrl

Additional Options

You can add any of the following options to the commands listed earlier in this section, except the vsperfaspnetcmd /shutdown command.

Option

Description

/Output: VspFile

By default, the profiling data (.vsp) file is created in the current directory with the file name PerformanceReport.vsp. Use the /output option to specify a different location, file name, or both.

/PackSymbols:Off

By default, VsPerfASPNETCmd embeds symbols (function and parameter names, etc) in the .vsp file. Embedding the symbols can make the profiling data file very large. If you will have access to the .pdb files that contain the symbols when you analyze the data, use the /packsymbols:off option to disable the embedding of the symbols.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_834359.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

外国官方网站下载文件速度缓慢

我们经常要下载东西,特别是一下专业软件就不得不到官方网站下载了,但很多这样的软件常常需要到外国的一些官方网站里下载了。可是,也经常遇到下载速度过于缓慢的的问题,在这我是用了一个简单但是略显笨的方法,但是也挺…

客户端通过主DNS、辅DNS、缓存DNS能够正常解析,客户端能够通过DNS解析域名来访问网站服务器。

实验要求: 客户端通过主DNS、辅DNS、缓存DNS能够正常解析,客户端能够通过DNS解析域名来访问网站服务器。 主DNS解析域名正向区域 反向区域 辅DNS解析域名缓存DNS解析域名通过DNS解析域名访问网站服务器PS:可能出现的问题: 解决方法&#xf…

爬虫学习之9:结合百度翻译API爬取PEXELS网站图片

PEXELS网站上的图片素材,质量很高,可以免费用于个人和商业用途,但是搜索功能不能用中文,这里结合百度翻译API完成搜索路径的构建。由于百度翻译API为个人申请使用,这里用XXX代替,需要的童鞋可以自己申请免费…

【建议收藏】六个免费的在线OCR识别网站,显著提高你的工作效率!

日常生活中,很多时候我们需要将图片信息转换成文字。比如读一本纸质版的书时,读到有价值的片段,希望保存成电子存档以后翻出来看;比如希望将照片里的文字信息提取出来保存;比如领导交给你一份纸质版表格让你录入excel。…

菜鸟上路Flask+Anaconda+Pycharm网站开发

之前一直用Django框架,然后老大说‘’Django框架太重了,换个轻的,就换了Flask,简单记录一下Flask开发的流程吧。 Step1:我的Python环境是Anaconda中集成的,版本是3.6版,Anaconda中也集成了Flas…

C# 获取网站站点根目录

获取站点ID: using Microsoft.Web.Administration; var sites new ServerManager().Sites["Mis"];string siteID sites.Id.ToString(); using System; using System.DirectoryServices; using System.Collections.Generic; using System.Text; namespac…

抖音seo

什么是抖音SEO?简单来说,就是围绕抖音的推荐算法做的SEO关键词布局和推广,达到自然引流的目的。 什么是抖音SEO算法? 1、内容搜索检索视频内容,寻找与 "减肥 "相关的视频,即系统会对声音、字幕等…

抖音SEO优化,抖音seo

抖音seo推广获客,抖音seo排名,抖音seo霸屏,抖音seo 抖音seo搜索 04-02 14:29 一、抖音seo优化是什么? 抖音seo是搜索引擎行业目前比较关注的领域,国内主流搜索引擎如百度、360、搜狗、神马大家对传统搜索引擎已根深蒂…

短视频seo优化,短视频seo

一、短视频SEO是什么?简单来说,就是围绕短视频的推荐算法,来做的SEO关键词布局和推广,达到自然引流目的。 二、短视频SEO算法是怎样的?1、内容检索检索视频内容,寻找和“美妆”相关的视频,也就是…

如何优化抖音SEO?

如何做抖音SEO优化? 1,关键词矩阵的布局:账户名称、视频文案、视频标题。 2,要确保视频素才高清,大量制作视频 3,视频的标题、字幕、声音画面等。都要含有关键词 4,根据视频内容和关键词中的…

抖音SEO优化

根据最新统计,当前我国短视频用户数量高达8.7亿人次,而其中短视频的月搜索量就超过5.5亿次,作为新的流浪风口,抓住抖音搜索,就等同于抓住成功的机会。那么今天针对抖音seo搜索,小编和大家聊聊什么是短视频S…

【短视频seo】短视频seo优化,抖音seo,抖音SEO优化

短视频SEO是什么? SEO是免费搜索排名优化。无论百度SEO,还是抖音的SEO旨在通过使用搜索引擎的规则获得长期、高质量和被动的流量。 我们在百度中搜索,会出现很多我们想知道的问题,有我们搜索关键词的文章,我们还可以选…

抖音矩阵系统源码,短视频矩阵系统源码。抖音SEO获客系统源码。

一. 账号人设定位 他会分为四种分类第一种行业号内容发布的视频可以以行业为主那么这种情况做出行业的内容来进行建立账号。专家号内容可以以专家形象来对账号人设进行建立比如如果是一个老本行的东西让一个小年轻去进行发布的话是不会有人信也不会有人去了解的。产品号内容可以…

抖音矩阵系统,短视频矩阵系统,抖音SEO获客系统源码。look

自从疫情开始,短视频就成为了主流。困在家里,不会写软文,拍视频最简单,问题是怎么做? 做一个短视频作品不容易,如何才能把一条短视频的作用发挥到最大?没有团队,不懂运营&#xff0…

抖音矩阵系统,抖音SEO源码,短视频矩阵系统源码,tell me

西瓜,抖音和火山,是今日头条的三大短视频矩阵。截止目前,今日头条西瓜视频的日播放量已经超过30亿,火山和抖音的播放量也分别超过20亿和10亿。 从播放量的成绩单上看,今日头条在短视频行业里算是非常优秀的了&#xf…

抖音矩阵系统,短视频矩阵系统,抖音SEO源码。look here

抖音做账号矩阵咋个做,以单个抖音短视频账号为例,落地步骤为:注册—养号—定位—内容搜集—编辑—上传—维护。做抖音短视频账号矩阵一定要注意账号的行为和IP。一个账号一个定位,内容不要跨界。单人也可以打造矩阵引流&#xff0…

短视频矩阵系统源码,抖音矩阵系统,抖音SEO系统源码。me

抖音目前最为现如今比较受欢迎的平台之一,平台的流量是非常大的,不少商家都会选在在抖音上面来推广自己的产品,想要获得更多的流量就需要提高搜索排名,下面我们就来看看抖音搜索排名怎么靠前? 1、账号的定位要明确 账号定位是什…

短视频矩阵系统,抖音矩阵系统源码,抖音SEO源码,tell

说到抖音矩阵,可能有很多小伙伴都不清楚是什么意思,这里先和大家分享下抖音矩阵是什么意思,简单的说抖音矩阵就是通过不同的抖音账号,实现抖音内容的全面展示。比方说可以通过这个抖音号关联一个其他领域的抖音小号,从…

短视频矩阵系统,抖音矩阵系统源码,抖音SEO源码look here

抖音短视频,一个直在帮助大众用户表达自我,记录美好生活的短视频分享平台。截止目前,抖音月活5亿,人人都是自媒体的时代已经到来。这是一个中小企业和草根创业者的机会,但很多人不知道怎么去运营抖音。做抖音两年来的一…

短视频矩阵系统源码。抖音矩阵系统源码。抖音SEO源码。

在流量为王的今天,谁引流做的好,获得的流量大,谁就能得到更多的客源,而有了客源之后,就是业务人员与消费者之间的博弈了。 因为DY搜索搜索引擎优化的推广取决于方法,这意味着它不需要花很多钱来得出结论。…