Ask a Question

Ram usage by Application

SOLVED
Michal_Ignaczak
Occasional Contributor

Ram usage by Application

Hello, 

 

I need to implement the Memory consumption meter for my tests and I wonder why my code shows me a different results than Windows Task Manager. 

 

My code (Python): 

 

 

 

def ram_usage(var_name):
  memory_usage = Sys.MemUsage
  Log.Message("Total memory usage:" + str(memory_usage) + "%")
  app_memory_usage = Sys.Process("MyApp").MemUsage 
  Log.Message("App memory usage:" + str(arena_memory_usage) + "kBytes")
  Project.Variables.VariableByName[var_name] = app_memory_usage

 

 

 

 

Should I use another methods to obtain RAM consumption ?

 

Best Regards,

Michal

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: Ram usage by Application

Hi Michal,

 

Both Task Manager and Sys.MemUsage provide pretty rough figures.

If you need to better monitor your tested application I would suggest to consider performance counters: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/monitoring-performance/index.h...

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

2 REPLIES 2
AlexKaras
Community Hero

Re: Ram usage by Application

Hi Michal,

 

Both Task Manager and Sys.MemUsage provide pretty rough figures.

If you need to better monitor your tested application I would suggest to consider performance counters: https://support.smartbear.com/testcomplete/docs/testing-with/advanced/monitoring-performance/index.h...

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

sonya_m
Community Manager

Re: Ram usage by Application

Thank you, Alex!

@Michal_Ignaczak does this help?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: