How can I use Insight to record a certain scope to a separate file?

straywriter/UnrealLab

I provides an example in here, ConcurrentLinearBulkObjectAllocatorTest2. CPP

Please install the plug-in, then CMD: Automation RunTest System. The Core.

Was there no problem with the first run

Then an error will occur after running it once again

[Image Removed]run this :

Automation RunTest System.Core.Memory.VariableSizeConcurrentLinearBulkObjectAllocator

what can I do?

Hi,

Insights/Trace does not support running multiple traces at the same time or writing out parts of a trace to a separate file.

If you want to create a separate file you will need to check if there’s a trace already running and stop that before starting a new one.

It’s possible the trace was started by some other system or automatically if the Insights executable was open when the Editor is started.

Overall I’d recommend to always check if a trace is running before starting a new one.

The API in FTraceAuxiliary can be used to start/stop traces or check if a trace is running, instead of executing console commands manually.

Another option would be to only create one trace file for the test run and use Timing Regions (TRACE_BEGIN_REGION/TRACE_END_REGION, see MiscTrace.h) to mark the area of interest inside the trace for later inspection.

Kind Regards,

Sebastian

I’m not sure I fully understand the question.

The TraceAuxiliary API allows you to start or stop trace sessions.

If you want to overwrite an existing trace file you can use FTraceAuxiliary::Start(EConnectionType::File, TEXT(“MyFile.utrace”), Options) and pass in an FTraceAuxiliary::FOptions struct with bTruncateFile=true to overwrite an existing trace.

How does FTraceAuxiliary recreate a trace file?

ok, ​This is it!