ValheimProfiler

版本 v1.1.13·更新於 2026-10-03

In-game Valheim profiling toolkit for Harmony patches, general methods and call trees, MonoBehaviour callbacks, update loops, logs, and dedicated-server network diagnostics.

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
ValheimProfiler-1.1.13.zip
檔案大小
357.2 KiB