Class ProfilingSampler
Wrapper around CPU and GPU profiling samplers. Use this along ProfilingScope to profile a piece of code.
Inherited Members
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. |