简体   繁体   English

如何配置在Compute Emulator中运行的Azure应用程序?

[英]How do I profile an Azure app running in the Compute Emulator?

I think profiling an application deployed to Azure is not a big deal http://msdn.microsoft.com/en-us/library/hh369930.aspx 我认为分析部署到Azure的应用程序并不是什么大问题http://msdn.microsoft.com/en-us/library/hh369930.aspx

I'd like to do the same locally, in the Compute Emulator. 我想在Compute Emulator中本地做同样的事情。 It looks like this is currently difficult http://www.pettijohn.com/2011/05/performance-testing-azure-dev-fabric.html at best, at least with the native VisualStudio 2010 profiler. 看起来这个目前很难http://www.pettijohn.com/2011/05/performance-testing-azure-dev-fabric.html充其量,至少使用原生VisualStudio 2010分析器。

Am I missing a simple way to do this? 我错过了一个简单的方法吗? Are there any third-party tools that make this fairly easy to do? 是否有任何第三方工具使这相当容易?

I'm using the Azure SDK 1.4 and Azure Tools for Visual Studio 2010 1.3 我正在使用Azure SDK 1.4和Azure Tools for Visual Studio 2010 1.3

For later versions of the SDK you can refer to this article in the Windows Azure documentation, where it is explained how to do CPU sampling for both worker roles and web roles: for the latter case, you should attach to the WaIISHost.exe process. 对于SDK的更高版本,您可以参考Windows Azure文档中的这篇文章 ,其中介绍了如何为工作者角色和Web角色执行CPU抽样:对于后一种情况,您应该附加到WaIISHost.exe进程。

As also indicated in the answer from Marcus Jansson, you may need to attach to the w3wp.exe process. 正如Marcus Jansson的回答中所示,您可能需要附加到w3wp.exe进程。 For example, when I'm debugging one of the web sites contained in a web role I need to explicitly attach to the w3wp.exe process that is hosting that site, since Visual Studio does not attach automatically to all relevant IIS instances. 例如,当我调试Web角色中包含的一个Web站点时,我需要显式附加到托管该站点的w3wp.exe进程,因为Visual Studio不会自动附加到所有相关的IIS实例。

UPDATE 2013-01-10 19:03 UTC I was unable to profile web roles using the linked instructions. 更新2013-01-10 19:03 UTC我无法使用链接指令来描述Web角色。 I discovered that: 我发现:

  • it is useless to attach to WaIISHost.exe , since it seems that it doesn't contain the role code; 附加到WaIISHost.exe是没用的,因为它似乎不包含角色代码;
  • I cannot attach to w3wp.exe instances from Visual Studio 2010 (I receive an error message with code VSP1449). 我无法从Visual Studio 2010附加到w3wp.exe实例(我收到代码为VSP1449的错误消息)。

Since I'm using Windows Azure SDK 1.8, I then tried to run my web role under IIS Express (see this post for further details) and then I attached to the iisexpress.exe process. 由于我使用的是Windows Azure SDK 1.8,因此我尝试在IIS Express下运行我的Web角色(有关详细信息,请参阅此帖子 ),然后我附加了iisexpress.exe进程。 This way I was able to profile my web site. 这样我就可以浏览我的网站。

如果在IIS中运行Web角色,则只需附加到进程w3wp.exe

I think it depends on what you're trying to profile. 我认为这取决于你想要描述的内容。

The link you included in your question is for profiling memory for a web role, and yes it looks a little involved. 您在问题中包含的链接用于分析Web角色的内存,是的,它看起来有点牵扯。

If you're looking to profile a worker role, it's much easier. 如果您想要描述一个职员角色,那就容易多了。 You can simply start the worker role through Visual Studio (or using the method mentioned in the post you linked to if you're worried about the effect of the debugger on the profiling) and select Analyze -> Profiler Attach/Detach -> WaWorkerHost. 您可以通过Visual Studio简单地启动辅助角色(或者使用您链接到的帖子中提到的方法,如果您担心调试器对分析的影响)并选择Analyze - > Profiler Attach / Detach - > WaWorkerHost。 From there it should look just like profiling any other application. 从那里它应该看起来像分析任何其他应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何连接到本地计算机上的Azure Compute模拟器 - How do I connect to a Azure Compute Emulator on my local machine 如何让Azure Compute Emulator以32位模式运行? - How do I get Azure Compute Emulator to run in 32 bit mode? 如何在部署角色之前强制启动Azure Compute Emulator? - How do I force start Azure Compute Emulator before the role is deployed? 在 Azure 计算仿真器之外使用 DiagnosticMonitorTraceListener 运行 - Running With DiagnosticMonitorTraceListener Outside of Azure Compute Emulator 在TeamCity代理上运行Azure Compute仿真器 - Running Azure Compute Emulator on a TeamCity Agent 如何在 Compute Emulator 中同时调试多个 Azure 角色? - How can I debug multiple Azure roles in the Compute Emulator simultaneously? 如何使用Visual Studio但不使用Azure模拟器将现有的Web应用程序项目部署到Azure? - How do I deploy an existing web app project to Azure using Visual Studio but no Azure Emulator? 如何在 VSCode 中使用 azure 应用服务发布配置文件部署应用? - How do I deploy an app using the azure app service publish profile in VSCode? Azure Compute Emulator无法启动 - Azure Compute Emulator will not start 在计算模拟器中分析Azure - Profiling Azure in the Compute Emulator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM