---
title: "CaptureScope"
sidebar_label: "CaptureScope"
description: "The clika_runtime.profiler CaptureScope class."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

An active capture region: while it is active, work dispatched on the constructing thread (and the streams it drives) is timed into the parent session. End it with end() or by using it as a context manager.

## `active` (property)

Whether the capture region is still recording.

## `__init__`

```python
__init__(self, /, *args, **kwargs)
```

Initialize self.  See help(type(self)) for accurate signature.

## `add_marker`

```python
add_markeradd_marker(self, label: str) -> None
```

add_marker(self, label: str) -> None

add_marker(label)

Drop a named instant event into the timeline at this point.

## `end`

```python
endend(self) -> None
```

end(self) -> None

end()

End the capture region; safe to call twice.
