# Sandbox.Rendering.CommandList.ProfileScope

```csharp
ProfilingScope ProfileScope(ProfilingSampler sampler)
```

Times a section of this command list on the GPU. Shows up as a PIX/RenderDoc event and as a row in
the GPU profiler overlay when profiling is enabled. Bound with a `using` block,
which is what decides where the section ends.

### Parameters

- `sampler` (`ProfilingSampler`)

### Returns

`ProfilingScope`

Declared in [Sandbox.Rendering.CommandList](/api/Sandbox.Rendering.CommandList).
Assembly: `Sandbox.Engine`.
