Forum Discussion

Michal_Ignaczak's avatar
Occasional Contributor
4 years ago

Ram usage by Application



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,


2 Replies