# LatencyTracker

> **Class** in `langchain_google_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-google-community/callbacks/bigquery_callback/LatencyTracker)

Thread-safe latency tracker for synchronous operations.

## Signature

```python
LatencyTracker(
    self,
    stale_threshold_ms: int = 300000,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `stale_threshold_ms` | `int` | No | Time in ms after which unfinished entries are considered stale and cleaned up. Defaults to 5 minutes. (default: `300000`) |

## Constructors

```python
__init__(
    self,
    stale_threshold_ms: int = 300000,
) -> None
```

| Name | Type |
|------|------|
| `stale_threshold_ms` | `int` |


## Methods

- [`start()`](https://reference.langchain.com/python/langchain-google-community/callbacks/bigquery_callback/LatencyTracker/start)
- [`start_component()`](https://reference.langchain.com/python/langchain-google-community/callbacks/bigquery_callback/LatencyTracker/start_component)
- [`end_component()`](https://reference.langchain.com/python/langchain-google-community/callbacks/bigquery_callback/LatencyTracker/end_component)
- [`end()`](https://reference.langchain.com/python/langchain-google-community/callbacks/bigquery_callback/LatencyTracker/end)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-google/blob/a3f016b2a6c4af535df275545f76fa7424aa39e5/libs/community/langchain_google_community/callbacks/bigquery_callback.py#L406)