CPU/Memory usage per keyword @ the time of execution

293 views
Skip to first unread message

Adi Keshav

unread,
Oct 10, 2016, 1:38:17 AM10/10/16
to robotframework-users
Is this possible? Any ways to go about it?

teegee

unread,
Oct 10, 2016, 5:14:36 PM10/10/16
to robotframework-users
Do you want total CPU/Memory usage or that of a particular process?
I've written a console application that can look up stats for a given process. It puts a JSON string on the stdout which you can parse in RF. It looks like this:
>ProcessInfo.exe explorer
{"HandleCount":3081,"PeakWorkingSet":777793536,"PrivateBytes":112033792,"ProcessName":"explorer","ProcessorTimeMs":895531.25,"ProcessorUsage":0,"Responding":1,"ThreadCount":99,"TimeStamp":"\/Date(1476134036665+1300)\/","UserHandles":981,"WorkingSet":138113024}
I'm happy to share.

Tom

David

unread,
Oct 11, 2016, 12:26:22 AM10/11/16
to robotframework-users
You want that bundled with the RF test results? Typically, it may be easier to collect those metrics separately in the background (which have timestamp entries for each collected CPU/memory value) and you correlate that against the keyword execution timestamps (I assume RF test results / execution logs would contain the timestamps, if not, maybe not much work to add that in).

Adi Keshav

unread,
Oct 12, 2016, 7:57:28 AM10/12/16
to robotframework-users
I was looking similar to the memory profiler for python 


is there anything that is for robot framework?

teegee

unread,
Oct 12, 2016, 4:46:16 PM10/12/16
to robotframework-users


On Monday, 10 October 2016 18:38:17 UTC+13, Adi Keshav wrote:
Reply all
Reply to author
Forward
0 new messages