XineladaLendaria-ValheimPerformanceAnalyzer icon

ValheimPerformanceAnalyzer

Analyzes Valheim and mod callbacks, loaded world objects, process CPU and RAM, GPU usage and VRAM, I/O, and admin-only server telemetry. Includes an interactive HUD and sortable HTML report.

Last updated a week ago
Total downloads 258
Total rating 2 
Categories Mods Tweaks Server-side Client-side Utility AI Generated
Dependency string XineladaLendaria-ValheimPerformanceAnalyzer-1.0.1
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333

README

Valheim Performance Analyzer

A BepInEx tool for finding which Valheim and mod callbacks consume the most time during gameplay. Version 1.0.1 combines callback profiling, process metrics, optional server telemetry, an interactive HUD, and a local HTML report.

Features

  • Measures exclusive time, call count, average and maximum duration, and exceptions for instrumented recurring callbacks.
  • Records estimated FPS, frame time, slow frames, and the estimated frame-time share of measured callbacks.
  • Measures Valheim process CPU use as a percentage of total logical processor capacity and process resident memory (working set), including average and peak values. On Windows, process memory also uses the native process memory API as a fallback.
  • Reports managed heap size, managed memory change, and garbage collection counts. Heap measurements are sampled separately from the process working set.
  • On Windows, measures the game's process-attributed 3D engine utilization and dedicated graphics memory when the system GPU counters are available. GPU utilization is an approximate per-process sample, not a vendor sensor reading.
  • Reports GPU frame time from Unity when supported by the graphics backend and driver, along with the graphics device and detected total VRAM.
  • Optionally counts loaded world entities with ZNetView, including hidden, inactive, and off-camera trees, items, and buildings. Players and creatures are excluded. The Loaded objects tab consolidates entities by object name and owning mod/game, sorted by quantity, with a total entity count. Expand a row to inspect its Unity instance IDs. Enable Capture loaded objects in the HUD to scan every two seconds during a capture; opening the HUD alone never scans. Enabled captures include the grouped results in the report.
  • Records process read and write bytes and average I/O rates. Windows counters may include cached operations and do not represent physical disk traffic.
  • Measures the observed FixedUpdate rate and compares it with Unity's target rate. On dedicated servers, this represents the simulation ticks observed by the mod.
  • Sends lightweight server FixedUpdate, CPU, and RAM metrics to clients every two seconds. The server sends these metrics only to clients that have this mod installed and whose accounts are recognized as server admins. To view dedicated server metrics, install the mod on both the server and client and connect as an admin. Remote metrics are unavailable without the server mod or admin access.
  • Groups callbacks by mod assembly and combines assembly_valheim with assembly_utils under vanilla Valheim. The frame budget percentage estimates each group's share of observed frame time.
  • Lets you expand each group to inspect its measured callbacks. The Hide vanilla Valheim filter is off by default and also filters the loaded-object list when an object's source can be identified.
  • Includes Summary, Callbacks, Mods, Components, and Loaded objects tabs, plus capture and export controls. Object counts are collected only during captures when Capture loaded objects is enabled; this option is off by default.
  • Lets you resize the HUD by dragging its borders. Press F9 to show or hide the panel, or use the × button to close it. The cursor is released while the HUD is open. Game controls and UGUI interfaces are blocked so the character cannot attack, move the camera, or click items behind the panel.
  • Lets you set the capture duration from the HUD, from 5 to 300 seconds in 5-second increments.
  • During a capture, displays elapsed and total time in the HUD and as a temporary character status effect with an icon and countdown. The effect does not change character attributes.
  • Exports a standalone index.html to BepInEx/config/ValheimPerformanceAnalyzer/Reports/ only when Export last report is clicked. A completed or manually stopped capture remains in the HUD and does not automatically create a report. Numbers follow the language selected in Valheim, and sortable columns use their underlying values. The first header click sorts ascending; the next reverses the order. Tables support column reordering and search.
  • Posts a concise report-directory path as a local-only chat line after the export button is clicked. This message is not sent to other players.
  • Shows the full text in a tooltip while the cursor is over HUD labels that have been truncated to fit.

Feature demonstrations

Summary

Valheim Performance Analyzer summary

Mod costs

Callback costs grouped by mod

Callbacks

Measured callback details

How to use

  1. Install BepInEx and place ValheimPerformanceAnalyzer.dll in BepInEx/plugins/ValheimPerformanceAnalyzer/.
  2. Start Valheim and enter the world you want to profile.
  3. Press F9 to open the HUD. Choose whether to include object scans with the highlighted Capture loaded objects toggle, set the duration with − / +, then click Start capture and reproduce the scenario. Object scanning is optional and disabled by default. The capture ends automatically or can be stopped with Stop capture; either way, the results remain in the HUD.
  4. In Mods, click a mod or vanilla Valheim to expand its callbacks. The mod list and expanded callback details are paginated to keep the HUD responsive. Use Components to inspect tracked types and instances. Loaded objects shows up to 50 object types per page, consolidated by object name and owning mod/game, ordered by quantity. Expand a row to inspect its Unity IDs. Opening this tab does not scan the scene.
  5. Click Export last report when you want to create the HTML report. The local chat shows the report directory; the message is not broadcast to other players.

You can also start and stop captures through the console:

perfprof start
perfprof stop
perfprof status

The console commands start, stop, or show the status of a capture. Export the report with the HUD button.

Client and dedicated server

Install the mod on the client to measure the local process, including CPU, resident RAM, GPU, I/O, and callbacks. A server installation is not required to investigate local FPS or callbacks.

To view remote FixedUpdate, CPU, and RAM metrics in the client's Summary tab, install the mod on both client and dedicated server, then connect with an account the server recognizes as an admin. The server does not display a HUD or automatically export HTML reports. It can start a capture with Capture/AutoStartCapture or the console commands. Periodic telemetry is sent only to modded clients that pass the admin check; vanilla clients and non-admin players do not receive these packets.

Interpreting the metrics

  • CPU: Valheim process use relative to the total capacity of all logical processors. 100% represents the full aggregate capacity; one fully occupied core on an 8-logical-processor system is about 12.5%.
  • RAM: Process working set (resident memory), with the Windows process memory API as a fallback. Managed heap and GC are measured separately.
  • GPU: Process-attributed 3D engine utilization and dedicated memory from Windows counters when available. Frame time is a separate Unity measurement and depends on the driver and graphics backend. Total VRAM is the detected device capacity.
  • Loaded objects: World entities with ZNetView in loaded scenes, including inactive, hidden, and off-camera objects. Entities whose Character component identifies them as players or creatures are excluded. Local scene objects without ZNetView are not counted. When Capture loaded objects is enabled, scans run every two seconds only during a capture; the option is off by default and opening the HUD never starts a scan. The HUD and report group results by normalized object name and owning assembly; each row's quantity is the number of matching loaded entities.
  • I/O: Read and write byte counters attributed to the process. Operating system caching can make measured traffic differ from physical disk reads.
  • Ticks: Observed FixedUpdate calls per second and the target derived from Time.fixedDeltaTime. This measures Unity simulation frequency, not ping or network rate.

Configuration

Settings are stored in BepInEx/config/com.kimbauer.valheim.performanceanalyzer.cfg:

  • Capture/DurationSeconds: default capture duration, from 5 to 300 seconds.
  • Capture/IncludeLoadedObjects: collects and groups loaded world objects during a capture; off by default. The HUD checkbox controls this option.
  • Capture/AutoStartCapture: starts a capture when a world session begins; useful on a dedicated server.
  • Capture/MaxTrackedComponents: limit on individual instrumented component instances retained per capture; it does not limit the grouped loaded-object list.
  • Capture/MaxPatchedMethods: limit on instrumented callbacks.
  • Interface/EnableHotkeys: enables F9 to show or hide the HUD.
  • Interface/OverlayHotkey: key used to show or hide the HUD.
  • Interface/HideValheimCallbacks: hides vanilla Valheim in views and reports; off by default.

The HUD starts closed. Press F9 to open it.