ValheimProfiler
In-game Valheim profiling toolkit for Harmony patches, general methods and call trees, MonoBehaviour callbacks, update loops, logs, and dedicated-server network diagnostics.
About this mod Author’s original text
Valheim Profiler
Valheim Profiler is an in-game diagnostics toolkit for Valheim mod development and server troubleshooting. It profiles Harmony patches, ordinary mod methods and call contexts, MonoBehaviour callbacks, Valheim update loops, logs, and selected dedicated-server network activity directly from an IMGUI overlay.
The mod is intended for short diagnostic sessions, not for normal gameplay. Most profilers instrument hot paths and can add overhead while they are enabled.
Features
- Launcher: opens the profiler suite from one compact window.
- Patch Profiler: measures Harmony Prefix, Postfix, Finalizer, transpiled target methods, and detected transpiler-injected call sites.
- General Method Profiler: measures selected synchronous mod methods on the main thread, with per-method statistics and navigable path-specific call trees. It is the second tool in the launcher.
- MonoBehaviour Frame Profiler: measures Update, FixedUpdate, LateUpdate, and OnGUI callbacks with grouping by mod and component.
- MonoBehaviour Call Profiler: measures lifecycle and selected declared MonoBehaviour methods such as Awake, Start, OnEnable, OnDisable, and OnDestroy.
- Valheim Update Profiler: measures centralized Valheim update batches, MonoUpdaters scopes, and WearNTear update scheduling.
- Client Log Monitor: shows the current client LogOutput.log, supports filtering, issue detection, history loading, and multi-row copy.
- Server Log Monitor: streams a dedicated server log to authorized admins through Valheim RPCs.
- Network Profiler: measures selected dedicated-server RPC, routed RPC, ZDO, and transport activity while an authorized admin is subscribed.
- Input control helpers: optional Prevent input and Prevent mouse modes make it easier to inspect UI tables without accidentally controlling the character.
Default hotkeys
| Tool | Hotkey |
|---|---:|
| Launcher / UI | F7 |
| Patch Profiler | F8 |
| Client Log Monitor | F9 |
| Server Log Monitor | F10 |
| Network Profiler | F11 |
The General Method Profiler, MonoBehaviour Frame Profiler, MonoBehaviour Call Profiler, and Valheim Update Profiler are available from the launcher but have no default direct hotkey.
Installation
Install with a mod manager or extract the package contents to your profile's BepInEx/plugins folder.
For client-only local profiling, install the mod on the client.
For remote dedicated-server diagnostics, install the same Valheim Profiler version on both:
- the headless dedicated server;
- the admin client that will subscribe to server diagnostics.
The only dependency is BepInExPack Valheim.
Dedicated server access
Server Log Monitor and Network Profiler are private admin tools:
- the client must have the same compatible Valheim Profiler build;
- the current player must be listed as a server admin;
- Network Profiler starts collecting server metrics only after an explicit Subscribe action.
Self-hosted/open-server sessions are intentionally not treated as dedicated-server network profiling sessions, because local rendering, gameplay, and loopback traffic make the measurements misleading.
Patch Profiler notes
Patch Profiler has two related but separate concepts:
- selecting a mod measures that mod's regular Harmony patches and detected Transpiler call rows;
- selecting Transpiled methods enables whole-target timing for methods modified by transpilers.
A transpiler-injected call is only shown in the main table after it receives runtime samples. Static zero-sample entries remain visible in the transpiled method details window.
Large Patch/General instrumentation changes are applied on the Unity main thread over multiple frames. With Gradual start enabled (default), each frame receives up to a 400 ms / 2560-operation backend budget. Disabling it processes the complete transition in one Unity frame, causing one long blocking freeze. An individual Harmony rebuild remains indivisible and can exceed either budget by itself. The toolbar shows install/remove
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: