🔧Profiler (Mono)
A Rust (language) native high-speed and lightweight Mono profiler with the ability to profile game assemblies, Carbon, plugins, modules & extensions at high depth.
Last updated
A Rust (language) native high-speed and lightweight Mono profiler with the ability to profile game assemblies, Carbon, plugins, modules & extensions at high depth.
Last updated
The Mono Profiler is a Carbon built-in feature, offering high performance and convenience, making it ideal for profiling the game, plugins, and more - efficiently.
You may profile the following:
Game assemblies (Assembly-CSharp, Facepunch.*, Rust.*, Unity*, System, etc.)
Carbon assemblies (Carbon.Common, Carbon.Compat, etc.)
Plugin assemblies
Module assemblies
Extension assemblies
The configuration for the profiler is located atcarbon/config.profiler.json
.
NOTE
To enable profiling with full selection for one or more categories, use a wildcard/star ( * ).
IMPORTANT
Remove the // comments from the JSON if you're willing to override it locally with it.
They're used when starting or stopping the profiler when processing is executed.
NOTE
If the Calls
flag is NOT set, only memory allocations will be profiled.
When the profiler is recording, this flag will terminate recording and discard collected stack and data processed natively.
Requires the Calls
flag to be set. The profiler will keep track of the memory of each call in the stack.
NOTICE
This flag will significantly affect performance due to having to calculate the time taken on each call.
Requires the Calls
flag to be set. The profiler will keep track of the timing & duration information for each call in the stack.
Whether method calls should be tracked by the current stack.
As posted under commands, we provide simplified commands for easy and quick management of the profiling process.
Switches in brackets [ ] means that the switch is optional.
c.profile
Starts and stops recording status of the Carbon native Mono-profiling.
Syntax: c.profile [duration]
c.profileabort
Stops and discards any data that has been recorded by the the Carbon native Mono-profiling.
c.profiler.print
If any parsed data available, it'll print basic information of the last profile to console. To get advanced information, write it to file with -f
.
Syntax: c.profiler.print [-c|-j|-t] [-f]
The [-c]
switch prints the output in CSV format.
The [-j]
switch prints the output in JSON format.
The [-t]
(default) switch prints the output in table format.
The [-f]
switch will write the profile to file in the root directory of the server.
c.profiler.tracks
All tracking lists present in the config which are used by the Mono profiler for tracking.
c.profiler.track
Adds an object to be tracked. Reloading the plugin will start tracking.
Syntax: c.profiler.track (assembly|plugin|module|ext) value
Restarting required for assemblies, modules and extensions.
c.profiler.untrack
Removes a plugin from being tracked. Reloading the plugin will remove it from being tracked.
Syntax: c.profiler.untrack (assembly|plugin|module|ext) value
Restarting required for assemblies, modules and extensions.