博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Windows Phone 7 - Performance 系列 (2)
阅读量:5024 次
发布时间:2019-06-12

本文共 8895 字,大约阅读时间需要 29 分钟。

Windows Phone Performance Analysis

            Windows Phone

 

December 15, 2011

The Windows Phone Performance Analysis tool is a profiling tool to evaluate and improve the performance of your Windows Phone applications. The Performance Analysis tool is installed as part of the Windows Phone SDK. It is fully integrated into Visual Studio and is accessible from the Debug menu. This topic provides an overview of the Performance Analysis tool and describes how it can help you improve the performance of your Windows Phone applications. To install the Windows Phone SDK, which include the Performance Analysis tool, see .

 


If you want to create a successful Windows Phone application that users will enjoy, you will need to spend time on performance. Even if you have a great idea for an application, if the application is slow, unresponsive, or periodically crashes, users will stop using it. For more information about Windows Phone performance, see .

In addition to creating a great user experience, Windows Phone applications must meet certain performance requirements to be published in the Marketplace. For example, there are certification requirements regarding the following:

  • Maximum memory usage by the application

  • Application launch time

  • Application responsiveness

You can use a tool such as the Marketplace Test Kit to identify some of the issues, but the Performance Analysis tool will help you determine the source of these issues in your applications. For a complete list and details about these certification requirements, see . For more information about the Marketplace Test Kit, see .


The Performance Analysis tool enables you to measure and analyze performance aspects of your applications. The tool enables you to evaluate either execution-related or memory-usage aspects of your application in a single profiling session. Each time you run the Performance Analysis tool, a file is created that contains performance information for that session. When selected, the contents of the file are displayed within Visual Studio and show the results in a series of performance graphs and tables that contain additional information. Because Windows Phone applications must meet certain performance requirements, using the Performance Analysis tool is an important step in preparing your application for submission to the Marketplace.

The following list includes some of the issues you can easily identify using the Performance Analysis tool:

  • Inconsistent application frame rate

  • High CPU usage

  • High memory usage

  • Insufficient garbage collection


The Performance Analysis tool has six performance areas that are displayed in a graph format. Each area is color-coded so it is easy to recognize in the graph. The following image shows an example graph.

The Windows Phone Profiler's "Graphs" area

Each graph entry displays the following information:

Frame rate

Displays the number of screen redraws, in frames per second, the application completed at that point in the timeline. This information is only available for periods in the timeline where the application was updating the display in some way. Windows Phone applications should average between 30 and 60 frames per second.

CPU usage %

Displays the percentage of phone CPU in use while the application was running. CPU usage is indicated by thread type in the graph. The following table lists the thread types.

Thread

Color in Graph

Notes

User Interface (UI) thread

Green

Indicates screen updates and touch inputs. You should try to keep the UI thread to less than 50% of CPU usage.

Application Threads

Purple

Indicates application activity that is not UI. This could be composition thread or background threads.

System Threads

Grey

Indicates activity that is not for the application. A large system thread percentage indicates that the system is busy with other background tasks and is affecting application performance.

Idle Threads

White

Indicates available CPU percentage. The higher the idle thread percentage, the more responsive the application should be.

Memory usage MB

Displays the amount of phone memory being used by the application measured in megabytes.

Storyboards

Displays an S flag on the timeline to indicate the occurrence of storyboard events. Typically a storyboard event indicates the start of an animation. There are two kinds of flags.

  • Red flag indicates a storyboard that is CPU-bound.

  • Purple flag indicates a storyboard that is not CPU bound.

Image loads

Displays an I flag on the timeline to indicate when image assets are loaded into phone memory.

GC events

Displays a G flag on the timeline to indicate when garbage collection occurs. This provides details about when the runtime reclaims memory space that was recently freed.

For more information about how to use the Performance Analysis tool and explore the graph information in more detail, see .


When you select a portion of the performance graph, a detailed performance analysis section appears. This section provides a Performance Warnings menu to further investigate performance issues as well as details about the performance for the selected time period in a tabular format. The following image shows a section of the graph selected and the resulting display in the detailed performance analysis section.

Windows Phone Profiler, with highlighted timeline

The Observation Summary column contains information and steps that walk you through expanding the menu options of the Performance Warning menu to investigate the details of a performance problem. The following image shows an example of an expanded Performance Warnings menu.

The Windows Phone Profiler's "Breadcrumb" menu

The following is a list of key performance terms you should be familiar with when using the Performance Analysis tool.

Performance Warnings

Notifications of possible performance problems. Warnings are displayed in the detailed performance analysis section.

Sampling

A statistical profiling method that shows you the functions that are doing most of the user mode work in the application by measuring the amount of time an application spends executing the sampled tasks and code paths.

Frame Rate

The number of screen updates rendered at that point in the timeline, expressed in frames-per-second.

CPU Usage

The percentage of available phone CPU capacity in use at that point in the timeline. This information is broken down by thread in the graph display, and can be broken down by method name in the detailed performance analysis section.

Memory Usage

The private working set of phone memory being used by the application at that point in the timeline.

Inclusive Samples

The total number (or percentage) of samples collected during the execution of the indicated (target) method. This includes samples that are collected during the direct execution of the method code and samples that are collected during the execution of child methods that are called by the target method.

Exclusive Samples

The total number (or percentage) of samples collected during the direct execution of the instructions of the indicated (target) method. Exclusive samples do not include samples that are collected during the execution of functions that are called by the target method.

Fill Rate

The total number of pixels on the screen at that point in the timeline.

Texture Count

The number of textures loaded into phone memory at that point in the timeline.

Dirty

The amount of time within the selected time period during which the indicated visual element was obsolete (awaiting rendering update).

Total Draw Time Exclusive

The amount of time (in milliseconds) that was required to render the indicated visual element. This measurement does not include time spent rendering any elements that were children of the indicated element in the visual element hierarchy (tree).

Total Draw Time Inclusive

The amount of time (in milliseconds) that was required to render the indicated visual element. This measurement includes time spent rendering any elements that were children of the indicated element in the visual element hierarchy (tree).

Measure Time Exclusive

The amount of time (in milliseconds) spent sizing and positioning the indicated visual element. This measurement does not include time spent sizing any elements that were children of the indicated element in the visual element hierarchy (tree).

Measure Time Inclusive

The amount of time (in milliseconds) spent sizing the indicated visual element. This measurement includes time spent sizing any elements that were children of the indicated element in the visual element hierarchy (tree).

Arrange Time

The amount of time (in milliseconds) spent positioning the indicated visual element.

Measure Count

The number of iterations required in sizing the indicated visual element in the selected duration.

Arrange Count

The number of iterations required in positioning the indicated visual element in the selected duration.

Texture Update Count

The number of textures being updated in the selected duration.


Other Resources

转载于:https://www.cnblogs.com/Jessy/archive/2011/12/21/2295462.html

你可能感兴趣的文章
oracle连接的三个配置文件(转)
查看>>
Vim配置文件(Vimrc)
查看>>
RecyclerView 局部刷新(获取viewHolder 去刷新)
查看>>
PHP表单(get,post)提交方式
查看>>
使用vbs或者bat脚本修改IE浏览器安全级别和选项
查看>>
Silverlight入门
查看>>
Silverlight动态调用WEBSERVICE,WCF方法
查看>>
LeetCode 895. Maximum Frequency Stack
查看>>
模仿segmentfault 评论
查看>>
一个简单的日志函数C++
查看>>
Java 8 中如何优雅的处理集合
查看>>
IOS程序的启动过程
查看>>
连接Linux下 XAMPP集成环境中部署的禅道的数据库MariaDB
查看>>
Java操作Excel和Word
查看>>
Oracle 体系结构之ORACLE物理结构
查看>>
ORA-12538: TNS: no such protocol adapter
查看>>
盒子模型
查看>>
局域网协议
查看>>
[HNOI2012]永无乡 线段树合并
查看>>
Spring整合hibernate:3、使用XML进行声明式的事务管理
查看>>