> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/evaluations-and-observability/latency-and-duration-definitions.md).

# Latency and Duration Definitions

Duration and latency describe different portions of execution. Use the metric’s definition before comparing projects or diagnosing slowness.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FvnpTf6csXv3tGm82OpwD%2FG077.mp4?alt=media&token=7c691632-03b6-4662-8fc0-12daab62568a>" %}

## Before you begin

Access to run timing details and the relevant analytics view.

## Timing metrics

| Term        | Definition                                                                                                                                |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Latency     | Delay measured between defined points in an interaction. Time to first update and time to complete the answer are different measurements. |
| Duration    | Elapsed time for the operation identified by the metric. Overlapping node durations should not simply be added to infer total run time.   |
| Streaming   | Delivery of incremental events or text while work is running. Updates are not the same as a completed answer.                             |
| Concurrency | Work on more than one item during overlapping periods. Completion order can differ from input order and provider rate limits still apply. |
| Timeout     | A limit on how long a particular client or operation waits. It does not always establish that execution or an external write stopped.     |

## Measure run duration

1. Check the metric label, date range, and filters.

![Review the reporting period and metrics before interpreting the results.](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/GozcbJnn9Fpcep22SVSm/assets/g077-g077-01-overview.png)

Review the reporting period and metrics before interpreting the results.

2. Compare the overall run with the slowest node or provider operation.
3. Inspect waiting, repeated actions, and streaming behavior before changing model settings.

You can identify which stage contributes to the delay.

## Behavior and limitations

Time to the first visible update is different from time to a completed answer. A client timeout is not a duration metric for a completed run. Parallel steps can overlap, so adding node durations may exceed total elapsed time. Compare equivalent execution paths and workloads.

## Related resources

[Inspect project analytics](https://docs.stackai.com/guides-and-quickstarts/evaluations-and-observability/inspect-project-analytics.md)

[Evaluation Datasets and Input Mapping](https://docs.stackai.com/technical-reference/evaluations-and-observability/evaluation-datasets-and-input-mapping.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/evaluations-and-observability/latency-and-duration-definitions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
