Execution Profiler Saves Incomplete Step Status When Saving TestStand Profile

Updated May 8, 2026

Reported In

Software

  • TestStand

Issue Details

I'm using the Profiler.dll in my TestStand sequence to programmatically run and save a TestStand Profile (.tpf file) of my test sequences' execution for performance analysis. 

 

When I call the "Save" method from the NationalInstruments.TestStand.Profiler.Profiler .NET class in my sequence, I notice that the generated .tpf file shows the last step's Completed status as "False" and that it is still running.  Below is a snippet of how this looks in my TestStand sequence where I run the Save method followed by the Close method:

 

 

Why would the last step running before calling the Save method show as incomplete if it clearly finished before moving to this current step?

Solution

This behavior is expected to happen when the Execution Profiler has not had enough time to finish processing event updates from the running sequence.  Since the .NET calls to the Execution Profiler from within TestStand are happening quickly, it doesn't get a final update from all pending events at the moment of saving the .tpf file.

 

To ensure that all previous steps and events have finished reporting their updates to the Execution Profiler, include the ProcessPendingEvents method before calling the Save method.  You can also exclude the Execution Profiler steps from the profile itself by following the steps in this link, Excluding Items from Profiling - NI .

 

Below is an image of the updated Exit_Execution_Profiler sequence shown above but with the added ProcessPendingEvents method: