Hi folks,
During automated testing I want to log and report the memory used by the target application. Is there a way to do that?
Thanks in advance.
Charles
How to get the amount of memory used by an application?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How to get the amount of memory used by an application?
Hi,
With Ranorex you have fully access to the .Net Framework. To get the memory of a specific process please use following code
Peter
Ranorex Team
With Ranorex you have fully access to the .Net Framework. To get the memory of a specific process please use following code
System.Diagnostics.Process[] proc = System.Diagnostics.Process.GetProcessesByName("firefox"); Console.WriteLine("Memory used: {0}.", proc[0].PrivateMemorySize.ToString());Regards,
Peter
Ranorex Team