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

  • Mastering CryENGINE
  • Sascha Gundlach Michelle K. Martin
  • 536字
  • 2021-07-16 12:07:25

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.

主站蜘蛛池模板: 麦盖提县| 滁州市| 冀州市| 巴林左旗| 垫江县| 襄汾县| 明光市| 桑植县| 赤水市| 深州市| 叶城县| 德令哈市| 昂仁县| 徐汇区| 江山市| 兰溪市| 广德县| 太仓市| 客服| 保亭| 德阳市| 株洲县| 涞水县| 柞水县| 寻甸| 临桂县| 泽州县| 河北省| 师宗县| 六安市| 托克逊县| 尉氏县| 故城县| 漳平市| 溧阳市| 洪雅县| 汉沽区| 义乌市| 大埔县| 龙江县| 乐至县|