官术网_书友最值得收藏!

Automated performance tests

Besides creating the actual CryENGINE builds on a regular schedule, it can be quite useful to create automatic performance benchmarks.

CryENGINE is a high performance 3D engine, which is able to render beautiful scenes at a high frame rate. However, there is always a chance that certain changes or additions made to your game project will affect the performance negatively. A line of badly written code or a few un-optimized assets might lower your frame rate considerably.

Being able to catch those performance issues early on is very important. The sooner a performance issue can be identified, the sooner it can be fixed.

Automated performance tests can help you spot those issues as soon as they appear.

Automated performance tests

Performance file generated using the save level stats command

Using level statistics to profile the performance of a level

CryENGINE has the ability to generate so-called level statistics files, which contain a lot of information about the performance situation of the level. By reviewing and comparing those files, it is easy to identify any existing performance problems. The level statistics file for a level can be generated manually using the savelevelstats console command. Let's give it a try and generate a level statistics file for your level.

  1. Open the level you want to profile in Sandbox.
  2. Type savelevelstats into the console.

Depending on your computer and the size of your level, it might take several minutes to generate the level statistics file.

The higher the object count of your level, the longer the process will take. The savelevelstats command will collect detailed information about every object in your level, hence the higher the object count, the longer the process will take.

Once the statistics file has been generated, let's open it up and have a look at the details.

  1. Go to the …/TestResults folder.
  2. Open levelname.xml.

You can see that the statistics files have been generated as .xml files. You will need to use MS Excel to view the files. If you do not have access to MS Excel, you can just download the free Excel file viewer from http://www.microsoft.com/en-us/download/details.aspx?id=10.

Now, let's have a look at what has been generated. Take a moment and browse through the information contained in the files. You will see that there is a lot of relevant information contained in the documents. Everything from the overall loading time of your level up to the polygon count of individual assets can be found. You can use all this information to create a comprehensive picture of the performance situation of your build.

A more detailed description of the individual entries in the level statistics file can be found in the official CryENGINE documentation found at http://freesdk.crydev.net.

You might have noticed that the level statistics files we just generated, although being very comprehensive, only show a snapshot of the performance situation of our level. They provide us with performance data from just the point in time they have been created.

Only collecting performance data over a longer period of time will allow you to see certain trends and developments.

Once your build scripts are set up to generate the level statistics automatically, you could also combine the gathered information in one easy-to-read document.

主站蜘蛛池模板: 宣威市| 久治县| 平邑县| 宜黄县| 平原县| 民乐县| 宿迁市| 民乐县| 江阴市| 广州市| 青州市| 嫩江县| 嘉祥县| 耿马| 托里县| 松江区| 闻喜县| 墨竹工卡县| 岑巩县| 桃江县| 安福县| 新乡县| 五指山市| 临沂市| 镇赉县| 红原县| 高陵县| 隆安县| 城步| 永济市| 太保市| 宾川县| 襄汾县| 临猗县| 河北省| 泾川县| 建宁县| 根河市| 内丘县| 信宜市| 日照市|