# Thread Profiling

### Overview

Thread Profiling allows you to to profile the threads within your application for a set amount of time, after which you will be able to explore the results of the profiling.

### Usage

To initiate a new profiling, click the **Request Thread Profiling** at the top right

<figure><img src="https://141808391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQIUN58YadwFHHtojkuQ5%2Fuploads%2FH5Ri2iY5Y0SnFMlY6YZa%2F2023-04-03%2013.16.35.gif?alt=media&#x26;token=16b3d89a-1195-452b-a4f6-cb81648b35ca" alt=""><figcaption></figcaption></figure>

Upon completion, click the **View Details** action to reveal the profiling window

The profiler runs for 60 seconds and gathers all thread dumps form this time, grouping the data by thread and thread state over time.&#x20;

&#x20;     \- Represents threads in a `RUNNING` state

&#x20;     \- Represents threads in a `WAITING` state

&#x20;     \- Represents threads in a `TIMED_WAITING` state

<figure><img src="https://141808391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQIUN58YadwFHHtojkuQ5%2Fuploads%2FhGzxwkHC8alvPi1SPJN2%2Fimage.png?alt=media&#x26;token=8a220984-9ffa-4d94-bbaa-8606c081d544" alt=""><figcaption></figcaption></figure>

Each grouped block is expandable and will show the thread's details, as well as the stack trace. Multiple blocks can be expanded at a time.

<figure><img src="https://141808391-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQIUN58YadwFHHtojkuQ5%2Fuploads%2F9YRGaxNdZkiBRfmLsAiS%2F2023-04-03%2013.27.29.gif?alt=media&#x26;token=39857588-c5cb-4422-974d-358169c8030e" alt=""><figcaption></figcaption></figure>

### Required Abilities

* [Thread Dump](https://docs.ostara.dev/features/abilities)


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ostara.dev/features/instance-features/jvm/thread-profiling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
