Search Results for

    Show / Hide Table of Contents

    Class ProfilerMemory

    Provides memory allocations collecting utilities.

    Inheritance
    System.Object
    ProfilerMemory
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public static class ProfilerMemory : Object

    Properties

    Enabled

    The profiling tools usage flag. Can be used to disable profiler. Run engine with '-mem' command line to activate it from start.

    Declaration
    [Unmanaged]
    public static bool Enabled { get; }
    Property Value
    System.Boolean

    Methods

    BeginGroup(ProfilerMemory.Groups)

    Enters a new group context scope (by the current thread). Informs the profiler about context of any memory allocations within.

    Declaration
    [Unmanaged]
    public static void BeginGroup(ProfilerMemory.Groups group)
    Parameters
    ProfilerMemory.Groups group

    The group to enter.

    DecrementGroup(ProfilerMemory.Groups, UInt64)

    Decrements memory usage by a specific group.

    Declaration
    [Unmanaged]
    public static void DecrementGroup(ProfilerMemory.Groups group, ulong size)
    Parameters
    ProfilerMemory.Groups group

    The group to update.

    System.UInt64 size

    The amount of memory freed (in bytes).

    Dump(String)

    Dumps the memory allocations stats (grouped).

    Declaration
    [DebugCommand]
    [Unmanaged]
    public static void Dump(string options = null)
    Parameters
    System.String options

    'all' to dump all groups, 'file' to dump info to a file (in Logs folder)

    EndGroup()

    Leaves the last group context scope (by the current thread).

    Declaration
    [Unmanaged]
    public static void EndGroup()

    GetGroupNames()

    Gets the names of all groups (array matches Groups enums).

    Declaration
    [Unmanaged]
    public static string[] GetGroupNames()
    Returns
    System.String[]

    GetGroups(Int32)

    Gets the memory stats for all groups (array matches Groups enums).

    Declaration
    [Unmanaged]
    public static ProfilerMemory.GroupsArray GetGroups(int mode = 0)
    Parameters
    System.Int32 mode

    0 to get current memory, 1 to get peek memory, 2 to get current count.

    Returns
    ProfilerMemory.GroupsArray

    IncrementGroup(ProfilerMemory.Groups, UInt64)

    Increments memory usage by a specific group.

    Declaration
    [Unmanaged]
    public static void IncrementGroup(ProfilerMemory.Groups group, ulong size)
    Parameters
    ProfilerMemory.Groups group

    The group to update.

    System.UInt64 size

    The amount of memory allocated (in bytes).

    RenameGroup(ProfilerMemory.Groups, String)

    Renames the group. Can be used for custom game/plugin groups naming.

    Declaration
    [Unmanaged]
    public static void RenameGroup(ProfilerMemory.Groups group, string name)
    Parameters
    ProfilerMemory.Groups group

    The group to update.

    System.String name

    The new name to set.

    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat