# How to profile Shipping build?

**URL:** <https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, question\
**Created:** [July 12, 2024, 2:26pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213 "2024-07-12T14:26:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [July 12, 2024, 2:26pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/1 "2024-07-12T14:26:15Z")

</div>

Hello,

Since I upgraded my project from ue5.3.2 to ue5.4.2, I noticed my packaged shipping build exhibits a large CPU spike every few seconds.

I tried to pinpoint the issue using PIE / Standalone / Packaged Develop build to no avail - the CPU spikes **ONLY** happens in packaged shipping build.

Since UnrealInsight cannot profile shipping build, I ran out of ideas on how to solve this issue.

Any ideas, advice, suggestions will be welcomed, thank you!

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2024, 2:50pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/2 "2024-07-12T14:50:41Z")

</div>

I see stuff in the docs about profiling shipping builds, although I’ve never done it

> **[Unreal Insights in Unreal Engine | Unreal Engine 5.4 Documentation | Epic...](https://docs.unrealengine.com/4.27/en-US/TestingAndOptimization/PerformanceAndProfiling/UnrealInsights/Overview/)**
>
> Profile your project's performance with Unreal Insights.

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [July 12, 2024, 3:28pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/3 "2024-07-12T15:28:37Z")

</div>

Thank you for the quick response!

I tried to use UnrealInsight to profile my shipping build, however, I stuck at the point where I need to type in console command : trace.send localhost - since there is no console command in shipping build for me to type in.

I then tried to type in -trace=default in MyShippingGame.exe shortcut, and that didn’t work either (my game didn’t show up in UnrealInsight session). ☹

Are there other ways to hookup shipping build into UnrealInsight?

Edit: 2024/07/12  
According to this documentation:

> **[Build Configurations Reference for Unreal Engine | Unreal Engine 5.4...](https://dev.epicgames.com/documentation/en-us/unreal-engine/build-configurations-reference-for-unreal-engine?application_version=5.4)**
>
> Reference guide for solution and project build configurations.

Shipping build - `This is the configuration for optimal performance and shipping your game. This configuration strips out console commands, stats, and profiling tools.`

It looks like we aren’t able to profile shipping build?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2024, 6:01pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/4 "2024-07-12T18:01:10Z")

</div>

You found this out in the future? 😂

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/c/21cd164fbb28d788d7d8aa02d49e31ac0c51c938.png)

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [July 12, 2024, 6:26pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/5 "2024-07-12T18:26:25Z")

</div>

Oh, I must’ve miss typed.  
Anyways, thanks for the reminder, I’ll correct it.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 12, 2024, 6:57pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/6 "2024-07-12T18:57:23Z")

</div>

I don’t know if this is a shipping build or not… ( at timestamp ) - could be totally wrong 🤔

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/b/3bb65da89dc0cd97ad726e87ffaa12e490e083ee.jpeg "New Features of Insights: Unreal Engine's Built In Profiling Tools | Inside Unreal") ](https://www.youtube.com/watch?v=af_M38Z325I&t=1215)

---

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [July 12, 2024, 7:18pm UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/7 "2024-07-12T19:18:18Z")

</div>

As an idea for a further search, in c++ there are such defines as:

```c++
#define ALLOW_CONSOLE_IN_SHIPPING 0
#define ALLOW_PROFILEGPU_IN_SHIPPING 0

```

i don’t see something like `allow cpu profiling`, but overall my idea is that profiling of shipping build is probably possible with proper build settings

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [July 13, 2024, 4:13am UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/8 "2024-07-13T04:13:45Z")

</div>

> [@ClockworkOcean](#):
>

Yeah, I was following this video tutorial, but sadly, the -trace=default commands didn’t work in shipping build. ☹

> [@IrSoil](#):
>
> `ALLOW_PROFILEGPU_IN_SHIPPING`

Thanks for sharing these flags, I’ll give it a try!

Edit 2024/07/13:  
It turns out I need to download the engine source code and build my own UE5 for these flags to successfully compile in a shipping build.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 13, 2024, 7:08am UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/9 "2024-07-13T07:08:42Z")

</div>

> [@rit](#):
>
> download the engine source

Was starting to suspect that… 😊

---

<div class="post-metadata">

**Author:** ![rit](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rit](https://forums.unrealengine.com/u/rit)\
**Post date:** [July 18, 2024, 9:44am UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/10 "2024-07-18T09:44:52Z")

</div>

This is a follow-up on my problem:  
I found out that the problem has something to do with `t.MaxFPS` console command.

If I set `t.MaxFPS = 60` the shipping build will run at 60fps _most of the time_, and occasionally, CPU (RHI) time will spike from 5~10(ms) to 20~30(ms) which causes the overall FPS to drop from 60fps to 40~30fps

If I set `t.MaxFPS = 120` the shipping build will _still run at 60fps_, however, CPU (RHI) time is stable at 10~11(ms) - no spikes anymore.

I’ve done the above test under both _windowed_ mode and _fullscreen_ mode with shipping build and yielded the same result.  
I suspect the RHI time spike has to do with GPU _barely_ maintaining at 60fps - set it to 120fps and that condition goes away - however, an explanation of what actually happened will be very appreciated.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [July 18, 2024, 10:00am UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/11 "2024-07-18T10:00:57Z")

</div>

I have no idea why this is happening, but I’ve also seen people report that frame rate smoothing, can also make the frame rate spikey… 🫠

---

<div class="post-metadata">

**Author:** ![Nimillion](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nimillion/32/897252_2.png) [@Nimillion](https://forums.unrealengine.com/u/Nimillion)\
**Post date:** [March 19, 2025, 6:37am UTC](https://forums.unrealengine.com/t/how-to-profile-shipping-build/1935213/12 "2025-03-19T06:37:06Z")

</div>

Not sure if that’s helpful but in my case I packaged a development build in order for Insight to connect.
