Ask a Question

measuring performance to open / create objects

jsc
Regular Contributor

measuring performance to open / create objects

Hi all,



I have to implement a performance-test, that opens and creates data-objects and calculates the time needed to open / create them.



I have to measure the time like this:



1) create object

- start: click on (context) menu entry "new"

- end: a letter is written into a field of the new object



2) open object

- start: doubleclick on the object in a list

- end: a letter is written into a field of the new object



I cannot take the visibility of the new object as the final point for the measurement as the object is still changing a bit after it is visible (the software fakes to be faster).



I am open to all kind of tips or links how this can be done the best way.



Thanks a lot.

Joachim





4 REPLIES 4
smcmickle
Contributor

Hi Joachim,



I've seen a video tutorial on the website that explains how to catch memory leaks, which could be useful on seeing how much CPU / Memory an action takes.



What is your definition of performance testing?
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
jsc
Regular Contributor

I need to know the time to open / create an object (= some user form). Time has to be measured from clicking on the command to open / create the form (Button "new" / doubleclick in list) until the first character can be entered in some field of the form.



cpu and memory usage in this case is not of interest.



best regards,

Joachim
smcmickle
Contributor

Here is the test I just made for my program to attempt to help you. Unfortunately, the aqDateTime object rounds seconds... So each individual result will be rounded down.. IE, doesn't make a difference if the time is 12:00:00 vs 12:00:00.0001 or 12:00:00.9999...




function timeTest()



{



var javaw;



var sessionWorkspace;



var internalSessionFrameProxy;



var stationTreeTable;



var timeBeforeClick;



var timeAfterClick;



var timeDifference;



var totalTime = 0;



javaw = Aliases.javaw;



for(var i = 0; i < 3; i++)



{



sessionWorkspace = javaw.frame02.RootPane.null_layeredPane.null_contentPane.C3C.SessionWorkspace;



//Time before the action

timeBeforeClick =
aqDateTime.Time();



// The Action



sessionWorkspace.InternalSessionFrameProxy3.RootPane.null_layeredPane.null_contentPane.StationBrowserPanel.TreeExplorer.SplitPane.Panel1.StationTablePanel.Panel.ScrollPane.Viewport.StationTablePanel_StationTable.DblClickCell(0, "Description");



internalSessionFrameProxy = sessionWorkspace.InternalSessionFrameProxy5;



// Create object and wait for response.



stationTreeTable = internalSessionFrameProxy.RootPane.null_layeredPane.null_contentPane.NavigableStationEditorController.Panel.Panel.DMS100StationEditorPanel.SplitPane.Panel.DnDTabbedPane.Panel.SplitPane.Panel.ScrollPane.Viewport.StationTreeTable;



//Check time after response



timeAfterClick =
aqDateTime.Time();



timeDifference = timeAfterClick - timeBeforeClick;



stationTreeTable.ClickCell(1, "Value");



stationTreeTable.TextField.Keys("time " + i);



internalSessionFrameProxy.WindowsInternalFrameTitlePane.BasicInternalFrameTitlePane_NoFocusButton.ClickButton();



javaw.dialog01.RootPane.null_layeredPane.null_contentPane.OptionPane.OptionPane_buttonArea.OptionPane_button.ClickButton();



Log.Message(timeDifference);



totalTime = totalTime + timeDifference;



}



var averageTime = totalTime/i;



Log.Message("The average run time out of " + i + " runs is " + averageTime);



}



Hope that helps!!


I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
jsc
Regular Contributor

Hi Sean,



thanks for your help, but rounding to seconds is not an option.



I found a possibility with using new Date().getTime().



Best regards,

Joachim
cancel
Showing results for 
Search instead for 
Did you mean: