# scopedmicroprofiler

Scope-based profiling event lifetime.

## tflite::ScopedMicroProfiler

`class` · `cpp`

```cpp
class ScopedMicroProfiler
```

This class can be used to add events to a `MicroProfiler` object that span the lifetime of the `ScopedMicroProfiler` object. Usage example:

`MicroProfiler` profiler(); ... { `ScopedMicroProfiler` scoped_profiler("custom_tag", profiler); work_to_profile(); }

Source: `tensorflow/lite/micro/micro_profiler.h:116`

### tflite::ScopedMicroProfiler::ScopedMicroProfiler

`method` · `cpp`

```cpp
tflite::ScopedMicroProfiler::ScopedMicroProfiler(const char *tag, MicroProfilerInterface *profiler)
```

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| tag | const char * | Required |  |
| profiler | MicroProfilerInterface * | Required |  |

Source: `tensorflow/lite/micro/micro_profiler.h:118`

### tflite::ScopedMicroProfiler::~ScopedMicroProfiler

`method` · `cpp`

```cpp
tflite::ScopedMicroProfiler::~ScopedMicroProfiler()
```

Source: `tensorflow/lite/micro/micro_profiler.h:126`
