Silverlight 的性能和诊断工具

发布于 2024-08-05 23:37:16 字数 326 浏览 11 评论 0 原文

WPF 3.5 具有用于诊断的 PresentationTraceSourcesWPFPerf 用于性能和数据绑定诊断。

Silverlight 是否有等效的工具/库?

WPF 3.5 has PresentationTraceSources for diagnostics and WPFPerf for performance and data binding diagnostics.

Are there equivalent tools / libraries for Silverlight?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我们只是彼此的过ke 2024-08-12 23:37:16

尽管我已将保利的答案标记为“答案”,但我想我应该总结一下迄今为止所发现的内容。

性能:

诊断:

  • Silverlight Spy 可以查看实时 XAML DOM
  • 数据绑定跟踪,因为代码不使用跟踪开关/源,所以无法配置跟踪。绑定错误直接写入 Trace.Write,并且 WPF SourceUpdated/TargetUpdated 事件在 Silverlight 中不可用。

Although I've marked Paully's answer as "the answer", I thought I'd summarise what I've found so far.

Performance:

Diagnostics:

  • Silverlight Spy can view live XAML DOM
  • Data Binding tracing cannot be configured since the code does not use trace switches/sources. Binding errors are written directly to Trace.Write and the WPF SourceUpdated/TargetUpdated events are not available in Silverlight.
万水千山粽是情ミ 2024-08-12 23:37:16

我不认为它像 WPF 那样强大,但是 这里是您可以执行的一些操作。

I don't think it's as robust as WPF but here is some things you can do.

无语# 2024-08-12 23:37:16

是的,虽然我确信拥有无数的性能诊断工具有趣,但您究竟想要实现什么目标?
看着你提到的 WPF 诊断工具,我只能想“噗,那又怎样?这些在 99.999% 的时间里都是无用的”。当实际调试真实世界的应用程序时,大多数数据都是相当无用的。在我看来,这些工具在调试 WPF 框架本身时最相关。

对于 Silverlight 中的某些问题,确实缺乏良好的诊断工具。
例如,目前有 0 个 Silverlight 商业内存分析器。但除此之外,我不确定为什么你还需要更多。那么,您到底需要哪些工具?

现在我已经不再沾沾自喜和振奋人心了(同时),我将指出您错过的 2 个工具:

  1. Silverlight SOS (Son-Of-Strike) 扩展:与桌面 SOS 扩展一样工作,但使用还有一些额外的命令,您将必须加载 silverlight 特定的 sos.dll。该工具非常适合深度内存分析,了解更多信息 此处此处
  2. Silverlight3 分析 类。使用此类,您可以获得进程的 CPU%、整个 CPU 使用率以及 GPU 卡的具体型号和型号。
  3. Silverlight 概览 - Karl Shifflett 的 DataBinding 调试“工具”/控件。

Right, so while I'm certain that possessing a myriad of perf diagnostics tools is fun, what exactly are you trying to accomplish?
Looking at WPF diagnostics tools you've mentioned I could only think "pffff, so what? These are useless 99.999% of the time". Most of that data is fairly useless when it comes down to actually debugging a real world app. Those tools are mostly relevant when debugging the WPF framework itself IMO.

It's definitely true that there's a shortage of good diagnostics tools for some issue in Silverlight.
For instance, there are 0 Silverlight commercial memory profilers out there. But beyond that, I'm unsure as to why you need more than those. So, which tools exactly do you need?

Now that I'm done being smug and uplifting (all at the same time), I'll call out 2 tools you've missed:

  1. Silverlight SOS (Son-Of-Strike) extension: Works just like the desktop SOS extension but with a few more extra commands and you'll have to load a silverlight specific sos.dll. This tool is excellent for in-depth memory profiling, learn more about it here and here.
  2. The Silverlight3 Analytics class. Using this class you can get the CPU% for your process, the whole CPU usage and the specific model and make for the GPU card.
  3. Glimpse for Silverlight - A DataBinding debugging "tool"/control by Karl Shifflett.
堇年纸鸢 2024-08-12 23:37:16

以下是如何使用 Silverlight 通过 ETW 来分析托管代码。

如何分析 silverlight 应用程序?

Here is how you can use Silverlight to profile managed code using ETW.

How to profile a silverlight application?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文