docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ProfilingSampler

    Wrapper around CPU and GPU profiling samplers. Use this along ProfilingScope to profile a piece of code.

    Inheritance
    object
    ProfilingSampler
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    [IgnoredByDeepProfiler]
    public class ProfilingSampler

    Constructors

    Name Description
    ProfilingSampler(string)

    Constructor.

    Properties

    Name Description
    cpuElapsedTime

    CPU Elapsed time in milliseconds (Command Buffer execution).

    cpuSampleCount

    Number of times the Profiling Sampler has hit on the CPU in the command buffer.

    enableRecording

    Set to true to enable recording of profiling sampler timings.

    gpuElapsedTime

    GPU Elapsed time in milliseconds.

    gpuSampleCount

    Number of times the Profiling Sampler has hit on the GPU

    inlineCpuElapsedTime

    CPU Elapsed time in milliseconds (Direct execution).

    inlineCpuSampleCount

    Number of times the Profiling Sampler has hit on the CPU.

    name

    Name of the Profiling Sampler

    Methods

    Name Description
    Begin(CommandBuffer)

    Begin the profiling block.

    End(CommandBuffer)

    End the profiling block.

    Get<TEnum>(TEnum)

    Get the sampler for the corresponding enumeration value.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)