Client Profiling: Difference between revisions
[checked revision] | [checked revision] |
No edit summary |
|||
Line 1: | Line 1: | ||
==Server profiling== | ==Server 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. | 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. | ||
'''During creation of the snapshot it is expected to have increased CPU usage, which may cause in game lags.''' | '''During creation of the snapshot it is expected to have increased CPU usage, which may cause in game lags.''' | ||
===Requirements=== | ===Requirements=== | ||
1. For dotnet trace CPU snapshots: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#install | 1. For dotnet trace CPU snapshots: https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace#install | ||
Line 32: | Line 32: | ||
Results may be accessed via the Web UI as well. It requires admin user permissions (using ''/profiler results'' command). | Results may be accessed via the Web UI as well. It requires admin user permissions (using ''/profiler results'' command). | ||
==Client Profiling== | ==Client Profiling== | ||
In | 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: | 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]] | [[File:Development build.png|none|thumb]] |
Revision as of 08:15, 15 November 2022
Server 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.
During creation of the snapshot it is expected to have increased CPU usage, which may cause in game lags.
Requirements
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:
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
.nettrace - can be opened with PerfView or converted to SpeedScope format.
Results may be accessed via the Web UI as well. It requires admin user permissions (using /profiler results command).
Client 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: