# _profile

URL: /pounce/api/_profile/
Section: api
Description: Request profiling — enabled via POUNCE_PROFILE=1.

Samples every Nth request and logs read/parse/app/drain timings to stderr
for bottleneck analysis. See docs/benchmark-pounce-chirp-deep-dive.md.

---

> For a complete page index, fetch /pounce/llms.txt.

Open LLM text
(/pounce/api/_profile/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_profile%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_profile%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_profile%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpounce%2Fapi%2F_profile%2Findex.txt)

Module

#
`_profile`

Request profiling — enabled via POUNCE_PROFILE=1.

Samples every Nth request and logs read/parse/app/drain timings to stderr
for bottleneck analysis. See docs/benchmark-pounce-chirp-deep-dive.md.

2Classes1Function

## Classes

`RequestProfile`

4

▼

Per-request timing samples.

Per-request timing samples.

#### Attributes

Name
Type
Description

`read_ms`

`float`

—

`parse_ms`

`float`

—

`app_ms`

`float`

—

`drain_ms`

`float`

—

`ProfileCollector`

3

▼

Collects sampled request timings and logs summaries.

Collects sampled request timings and logs summaries.

#### Methods

`should_sample`

0

`bool`

▼

`def should_sample(self) -> bool`

##### Returns

`bool`

`record`

1

▼

`def record(self, sample: RequestProfile) -> None`

##### Parameters

Name
Type
Description

`sample`
`—`

Internal Methods
1

▼

`__init__`

1

▼

`def __init__(self, worker_id: int = 0) -> None`

##### Parameters

Name
Type
Description

`worker_id`
`—`

Default:`0`

## Functions

`_p99`

1

`float`

▼

Return the 99th percentile of ``values`` using linear interpolation.

`def _p99(values: list[float]) -> float`

##### Parameters

Name
Type
Description

`values`
`list[float]`

##### Returns

`float`
