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.

Installation

To use Tracy for profiling in Neverwinter Nights, follow these steps:

  1. Download Tracy: Use your favorite package manager, or go to the Tracy GitHub repository and download the latest release suitable for your operating system.

  2. Run a build of NWN with Tracy enabled: install the game via your game service, e.g. Steam. To access preview builds, see https://discord.com/channels/382306806866771978/1159424565387198555

    1. For servers running in docker environments you'll need an image with the correct nwserver binary installed
      1. Without nwnx: use a prebuilt image from https://github.com/urothis/nwserver/
      2. With nwnx: 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)

Configuration

Enable tracy in settings.tml

[instrumentation]
    [instrumentation.tracy]
        bind-all-interfaces = true
        enabled = true
        port = 8086

Profiling NWN

To profile using Tracy, follow the documentation referred to in the Tracy GitHub repository.

Note that docker containers must expose the Tracy port to be able to connect. See configuration example for the port.