NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Can ResultList be dynamically cleaned up during runtime to save memory space?

Solved!
Go to solution

Hi, Everyone:

 

     I have a problem that has been bothering me for many days and I need you help.

 

     The problem is:

 

           I developed a customized UserInterface based TestStand API, calling Batch Process Model with ProcessModelPostResultListEntry callback. I initialized 40 sockets for testing (which may need to be increased to 64 later), and obtained real-time test data for each step of each socket through UIMessage.

 

           When I started testing 40 sockets, the memory consumption of the test computer maintained a rapid growth rate of about 2 minutes/1GB. By the time the test progressed to 20 minutes, 16GB memory had already occupied 15GB (including 4GB of the OS). At this point, calling the native callback for generating XML reports, the memory has been consistently within the critical range of 16GB. The generation of 40 report files took over 30 minutes, and there is a certain probability of a crash risk.

 

           For this, I came up with some solutions and completely solved the problem of report generation. The new method is very fast and consumes very little memory to complete.

 

           Now, I am starting to optimize memory consumption during the testing process:


               1. First solution: Set the Result Recording of some unimportant steps to disable, which indeed reduces some memory consumption, but it is not enough (because in actual testing, more than 40 sockets need to be tested for 3-4 hours)
                2. The second solution is what I want to know: when a step test is completed and its test data is thrown through the ProcessModelPostResultListEntry callback (the test report will be processed from the thrown data instead of ResultList []), is there a way to clean up the data of this step in ResultList []? Even if it's just clearing the contents of the array? How should I operate if possible?

 

 

        If anyone has any good ideas, please let me know. Thank you very much!

0 Kudos
Message 1 of 5
(359 Views)

@Oli_Wachno:

Sorry, I apologize for replying to my inappropriate topic
Actually, I'm just saying that I can do that
You know, everyone will encounter problems they cannot solve on their own

Thank you for pointing out the areas where I didn't do well!

Message 3 of 5
(311 Views)
Solution
Accepted by topic author Andrew2024

Andrew,

 

to solve your issue, you might actually look into using "On-the-fly Reporting --> this will monitor the result list and create the report while the test sequence is executed and purge the project data from the result list. Yet this does need some processing ressources, so you need to check, if this a potential issue for your application.

Oli_Wachno_2-1719981563697.png

If you see performance issues, you probably can cirumvent them to some degree by switching over to offline result processing: TestStand doesn't perform the creation of Test Reports but instead throws all the data in a (binary) file which can be converted to the actual TestReport using the Offline Result Processing Utility

(https://www.ni.com/de/support/documentation/supplemental/08/improving-teststand-system-performance.h...  somewhere near the bottom of the page)

 

 

0 Kudos
Message 4 of 5
(297 Views)

Hi, Oli_Wachno:

         Yes, I found the content you described through the URL link you provided. Thank you very much for your help, which has provided me with a different approach and direction in trying to solve this problem.
         Many thanks for you again and hope you have a nice day!

0 Kudos
Message 5 of 5
(287 Views)