# Live Game Profiler

You can export a profile of server CPU usage to debug lag. It provides a breakdown of all compute activity per frame.

### Generate a profile

To generate a profile head into a game server and in the [Developer Console \[F1\]](/core-package/developer-console.md) type:

```
profile server 5 false
```

This will run and upload a profile to the create dashboard. Once it is ready the download link will be sent in your console. You can also find all server profiles via the "Artifacts" page on create dashboard.

{% hint style="info" %}
The `5` is to record for 5 seconds. The `false` is to disable deep callstacks.
{% endhint %}

### Load a profile

Once you have downloaded your server profile you can load it in the Unity editor.

1. Go to `Window > Analysis > Profiler` (Ctrl+7)
2. Click the load binary profiling information button at the top right and select the downloaded .raw

To learn more about how to use the profiler head to [Unity's Profiler docs](https://docs.unity3d.com/Manual/Profiler.html).


---

# 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.airship.gg/optimization/live-game-profiler.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.
