---
title: PassThroughProfiler
description: >-
  This class should be used when you don’t want the (small) overhead of
  profiling.
canonical: >-
  https://lightning.ai/docs/pytorch/stable/optional-api/api/lightning.pytorch.profilers.PassThroughProfiler
---
# PassThroughProfiler {#passthroughprofiler}

### `class lightning.pytorch.profilers.PassThroughProfiler(dirpath=None, filename=None)` {#lightning.pytorch.profilers.PassThroughProfiler}

Bases: [`Profiler`](/docs/pytorch/2.6.6/optional-api/api/lightning.pytorch.profilers.Profiler.md#lightning.pytorch.profilers.Profiler "lightning.pytorch.profilers.profiler.Profiler")

This class should be used when you don’t want the (small) overhead of profiling.

The Trainer uses this class by default.

#### `start(action_name)` {#lightning.pytorch.profilers.PassThroughProfiler.start}

Defines how to start recording an action.

Return type:

[`None`](https://docs.python.org/3/builtins/constants.html#None "(in Python v3.15)")

#### `stop(action_name)` {#lightning.pytorch.profilers.PassThroughProfiler.stop}

Defines how to record the duration once an action is complete.

Return type:

[`None`](https://docs.python.org/3/builtins/constants.html#None "(in Python v3.15)")

---

**Navigation**

- Parent: [Api](/docs/pytorch/2.6.6/optional-api/api.md)
