07-02-2024 06:07 AM
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!
Solved! Go to Solution.
07-02-2024 09:22 AM - edited 07-02-2024 09:24 AM
07-02-2024 08:29 PM
@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!
07-02-2024 11:43 PM
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.
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)
07-03-2024 01:03 AM
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!