---
title: "Analyze Bottlenecks"
method: GET
path: "/v1/analytics/performance/engine/bottlenecks"
tags: ["Analytics", "Analytics - Performance"]
---

# Analyze Bottlenecks

`GET /v1/analytics/performance/engine/bottlenecks`

Identify performance bottlenecks.

Analyzes profiling data to identify the biggest bottlenecks,
ranked by total time spent.

**Use Cases:**
- Find what's slowing down your pipelines
- Prioritize optimization efforts
- Monitor bottleneck trends

**Ranking:**
- Sorted by total time spent (sum across all executions)
- Shows percentage of total execution time
- Includes execution count and average time

**Example:**
```bash
GET /v1/analytics/performance/engine/bottlenecks?hours=24&limit=10
```

## Query parameters

- `hours` integer — Hours of history
- `limit` integer — Number of bottlenecks to return

## Response `200`

Successful Response

- BottleneckResponse — Response for bottleneck analysis.
  - `time_range` ApiAnalyticsModelsTimeRange, required — Time range for analytics queries.
    - `start` string, date-time, required — Start time (UTC)
    - `end` string, date-time, required — End time (UTC)
  - `bottlenecks` BottleneckAnalysis[], required — Ranked list of bottlenecks
    - `stage_name` string, required — Stage name
    - `component` string, required — Component
    - `execution_count` integer, required — Number of executions
    - `total_time_ms` number, required — Total time spent
    - `avg_time_ms` number, required — Average time per execution
    - `pct_of_total` number, required — Percentage of total execution time
    - `rank` integer, required — Bottleneck ranking (1 = worst)
  - `total_time_ms` number, required — Total execution time across all components

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/04b379bdbb7c/schema)
