ProfilerValheim Zeta

版本 v1.1.2·更新於 2026-03-06

A developer tool for in-game CPU profiling of BepInEx mods. Shows per-mod and per-method CPU load, spike alerts, A/B snapshots comparison and report export. Not intended for regular gameplay.

模組介紹 作者原文

ProfilerValheim Zeta

Author: Skarif

Version: 1.1.0

GitHub: SkarifWW/ProfilerValheim.Zeta

Toggle overlay: F8

⚠️ This is not a gameplay mod.

ProfilerValheim Zeta does not add items, mechanics, or any content to your game.

It is a developer and modder tool designed for CPU profiling, performance analysis,

and debugging of BepInEx plugin assemblies inside a live Valheim session.

If you are a regular player looking to improve FPS - this is not what you need.

What is it?

ProfilerValheim Zeta is an in-game profiler that instruments other BepInEx mods at runtime using Harmony hooks and measures how much CPU time each mod consumes per frame - broken down to the individual method level.

The key difference from external profilers (like dotTrace or Unity Profiler) is that it runs inside the game, in real gameplay conditions, with your exact mod list loaded, without any separate process or build configuration. You press one button, it scans your installed mods, and immediately starts showing live data.

It was built for situations like:

  • "My FPS dropped after I installed three new mods - which one is the culprit?"
  • "I'm optimising my own mod and need to see which Update() method is the bottleneck."
  • "The game stutters every 10 seconds. I need to catch the spike and see what caused it."

Features

Live CPU Graph

A rolling 300-frame CPU load graph is drawn at the top of the profiler window.

  • White line - total load from all tracked mods combined.
  • Coloured lines - top 5 heaviest mods, each with its own colour.
  • Orange line - worst-frame rolling maximum with slow decay. This is the line that reveals spikes that averages would hide.
  • Horizontal reference lines - 60 FPS (16.6 ms, green), 30 FPS (33.3 ms, yellow), 15 FPS (66 ms, red).
  • Interactive tooltip - hover over any point on the graph to see Total ms, Worst ms, and the name of the heaviest mod at that moment.

Event Markers

Press MARK EVENT at any moment during gameplay - a green vertical stamp appears on the graph at that exact frame. Use it to correlate what you were doing with what you see on the graph (entering a dungeon, interacting with a chest, triggering a boss, etc.).

Per-Mod Table

Below the graph is a sortable table of all scanned mods:

| Column | Description |

|---|---|

| Mod Name | Assembly name of the BepInEx plugin |

| Avg CPU | Average self-time per frame in milliseconds |

| Impact | Percentage of total frame budget consumed |

| Calls/s | Number of instrumented method calls per second |

Impact is colour-coded: red above 5%, yellow above 1%.

Method Drill-Down

Click any row in the mod table to expand it and see the top 10 heaviest individual methods within that assembly - with their own AvgMs and Calls/s. This is the feature that turns "mod X is slow" into "method Foo.Update inside mod X is the bottleneck".

Search & Filter

  • Live text search filters the table by mod name.
  • Hide ℹ️ Scanning takes a moment depending on how many mods you have installed. The status bar at the top of the window shows progress. You can click STOP SCAN at any time - already-applied hooks remain active.

Performance Impact of the Profiler Itself

Every instrumented method call goes through a Prefix and Postfix wrapper. The overhead per call is a few hundred nanoseconds (two Stopwatch.GetTimestamp() calls and some stack operations). On a typical modpack of 30–50 mods this adds up to roughly 0.1–0.5 ms total per frame - visible but not game-breaking for a diagnostic session.

When STOP MONITORING is pressed, recording is disabled at the very first line of every Prefix - the overhead drops to a single branch check, essentially zero.

Limitations

  • Only mods loaded at startup are scanned. Dynamically loaded assemblies added after game start are not automatically discovered.
  • Generic methods and abstract methods cannot be patched by Harmony and are skipped silently.
  • The profiler measures managed C# code only - native Unity engine code (rendering, physics, audio) is not visible.
  • static const

安裝與使用 安裝:BepInEx 外掛

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

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

前置依賴

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

denikson-BepInExPack_Valheim

檔案與校驗

檔案名稱
ProfilerValheim_Zeta-1.1.2.zip
檔案大小
164.8 KiB