Client Profiling: Difference between revisions

From Eco - English Wiki
[checked revision][checked revision]
m Dennis moved page Performance Profiling to Client Profiling without leaving a redirect: We already had a page for server profiling.
Changed to client profiling only, added new profiling methods.
Line 1: Line 1:
==Server profiling==
==General Profiling==
Server profiling is available in release build both for memory and CPU. For CPU profiling it takes a 1 minute snapshot, for memory it makes a dump file.
In a development build you can use the `F6` key to make a snapshot. Check the chat log for output file location details.


'''During creation of the snapshot it is expected to have increased CPU usage, which may cause in game lags.'''
You can check if you're running a development build by looking up if this message is present in the right bottom corner:
===Requirements===
[[File:Development build.png|none|thumb]]
1. For dotnet trace CPU snapshots: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#install
 
2. For memory dumps: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump#install
 
3. For JetBrains dotTrace snapshots: https://www.jetbrains.com/help/profiler/Performance_Profiling__Profiling_Using_the_Command_Line.html#install-and-use-the-command-line-tool-as-a-net-core-tool. For snapshot analysis it requires dotTrace license (trial available), but the snapshot itself can be done without license.
===Server GUI===
Snapshots can be made via the server GUI menu:
[[File:Server profiling.png|none|thumb]]
===Chat Commands===
May be invoked from game by a user with admin privileges. Mirrors GUI menu commands:
*''/profiler full'' - both CPU (.nettrace) and memory snapshots **(Do not use - nettrace doesn't give insightful results)**
*''/profiler dump'' - memory dump only
*''/profiler cpu'' - CPU (.nettrace) snapshot only **(Do not use - nettrace doesn't give insightful results)**
*''/profiler dottrace'' - dotTrace Timeline snapshot
*''/profiler results'' - opens web page where profiling results may be downloaded
===Output results===
All profiling results are stored in the Server/ProfilingResults directory. You can check the exact log path in the server log. Results are saved as .zip file and may need to be extracted first.
 
.dtt - can be opened JetBrains dotTrace


.dmp - Memory dump, can be opened with JetBrains dotMemory, WinDbg or VisualStudio
== Transforms Profiling ==


.nettrace - can be opened with PerfView or converted to SpeedScope format.  
# Open Diagnostic Pages UI (with F2).
# Go to Transforms page (navigate pages with F3/F4). Page itself significantly impacts performance so keep it closed when you don't need transform updates data.
# When you have FPS problems open the page, wait for few seconds and make a screenshot. Attach it to report.
# Then run /savetransformstats command in console, find in same directory as Player.log file named transform-stats..txt and also attach it to report.


Read more: https://github.com/dotnet/diagnostics/blob/main/documentation/dotnet-trace-instructions.md#viewing-the-trace-captured-from-dotnet-trace.
== Test which objects have the most performance impact ==


Results may be accessed via the Web UI as well. It requires admin user permissions (using ''/profiler results'' command).
# Use /disableobjects {trees,animals,worldobjects,rubbles} (one of the options) to disable rendering of specific group of objects. Then you can check if it fixes your FPS or not. You can also test if with that group disabled you have performance degradation issues or not.
==Client Profiling==
# Use /enableobjects all (or speicific group you previously disabled) to re-enable all objects. Though all objects which was previously disabled won't be recovered - you need to re-enter the world or reload these objects by leaving and returning to the area.
In a development build you can use the `F6` key to make a snapshot. Check the chat log for output file location details.
 
You can check if you're running a development build by looking up if this message is present in the right bottom corner:
[[File:Development build.png|none|thumb]]

Revision as of 12:08, 15 November 2022

General Profiling

In a development build you can use the `F6` key to make a snapshot. Check the chat log for output file location details.

You can check if you're running a development build by looking up if this message is present in the right bottom corner:

Transforms Profiling

  1. Open Diagnostic Pages UI (with F2).
  2. Go to Transforms page (navigate pages with F3/F4). Page itself significantly impacts performance so keep it closed when you don't need transform updates data.
  3. When you have FPS problems open the page, wait for few seconds and make a screenshot. Attach it to report.
  4. Then run /savetransformstats command in console, find in same directory as Player.log file named transform-stats..txt and also attach it to report.

Test which objects have the most performance impact

  1. Use /disableobjects {trees,animals,worldobjects,rubbles} (one of the options) to disable rendering of specific group of objects. Then you can check if it fixes your FPS or not. You can also test if with that group disabled you have performance degradation issues or not.
  2. Use /enableobjects all (or speicific group you previously disabled) to re-enable all objects. Though all objects which was previously disabled won't be recovered - you need to re-enter the world or reload these objects by leaving and returning to the area.