A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.
Available since: [89.8193.37-1] - 2023-12-30 (Preview)
Tracy can be run against any module running at least build 8193.37-1, and will provide a reasonable overview about what's going on. The intent is to give module authors and server admins more autonomy in self-diagnosing problems with their server, and also to support collection of traces for analysis by the dev team for problematic scenes.
It is available to both client and dedicated server.
Install
NWN ships with Tracy installed, but at the time of writing this is limited to the preview builds. To access preview builds, see https://discord.com/channels/382306806866771978/1159424565387198555.
Once installed you can find the Tracy client in
$NWN_INSTALL_DIRECTORY/bin/$OS/tracy/Tracy
E.g. on Linux using Steam it will be in
~/.local/share/Steam/steamapps/common/Neverwinter\ Nights/bin/linux-x86/tracy/Tracy
The binaries shipped with the game have a small patch applied to allow connecting after app start, which you can also find in ./bin/ if you'd like to rebuild them locally.
Configure
For clients, you can find the toggle to enable this functionality in the Options UI (just search for "tracy" in the search box). Note that you will need to restart your game after changing this config.
For dedicated servers, you need to edit settings.tml:
[instrumentation]
[instrumentation.tracy]
enabled = true
port = 8086
Tracy always binds to the local interface. If you'd like to access your device remotely, please use SSH port forwarding or similar. Do not expose this port to the internet: It is entirely unauthenticated and it's security has not been designed to be publicly accessible.
Run
Client (nwmain)
- Launch the client
- Launch Tracy
Dedicated server (nwserver)
- Native
- Nwnx ?
- No: skip
- Yes: compile nwnx for the target version of nwserver
- Launch nwserver
- Launch Tracy
- Nwnx ?
- Docker
- Nwnx ?
- No: Use a prebuilt image from https://github.com/urothis/nwserver/
- Yes: Use a prebuilt image from https://github.com/nwnxee/unified/ if one exists for the target version of nwn. At the time of writing Tracy is only available in the preview build, for which there is no prebuilt nwnx image. To build your own image, you may use this script https://github.com/nwnxee/unified/blob/a4869fdb2047a4e8c94866e382c94056e0d13929/Scripts/buildimages.sh (TODO: update after PR merge/close)
- Expose the Tracy port to be able to connect. See configuration example for the port
- Launch the container
- Launch Tracy
- Nwnx ?
To understand Tracy in detail, refer to the official documentation in the Tracy GitHub repository.