I have two tasks that act as begin and end sync points of a section of the task graph. There is no guarantee about the thread that the begin or end tasks execute on. I’d like to add some profiling data to see how long it takes between running the begin task and running the end task. Then it would be great to visualise them somehow in the profiler so I can see the duration of this section in unreal insights. Is this possible to do,
you can use “Timing Regions” to mark a time span that exists over multiple frames.
They are shown in their own custom track and look something like this:
[Image Removed]They are intended for low-frequency events, so if you ran more than a few instances at the same time the visualization might not be easy to read anymore.
The generic usage for them looks like this:
`// As a class member or similar storage
uint64 RegionId = 0;
// To open the region
RegionId = TRACE_BEGIN_REGION_WITH_ID(TEXT(“MyRegionName”));
// To close the region
if (RegionId != 0)
{
TRACE_END_REGION_WITH_ID(RegionId);
}`You can also open/close regions just using the string without storing an ID, but that could get ambiguous if you have multiple open regions with the same string name.