Any example on calculate time elapsed on XdataWebDataset.load in Tms WebCore?
I need to monitoring performances on loading data.
Thanks in advance
Do you need this data or is logging in the browser console sufficient?
If logging in the browser console sufficient, you can use console.time() / console.timeEnd()
In VCL I use TStopWatch with StartNew and Stop, with ElapsedMilliseconds in a caption.
For exaustive tests (for compare also several DB) I have always a label with ElapsedTime in the form.
I will use Console.Time and Console.timeEnd(), but a solution in "Delphi" code is a better solution for show that time, if you have it.
At this moment, we do not have a "Delphi" solution, but it is a good idea to reflect on this.
I was about to start a similar topic.
For a while now, I got some very basic code to measure the time. E.g. for the TWebContinuousScroll, finding the time elapsed between the first onGetListItem call and the onFetchNextPage event to measure the server response time and the difference between the onPageLoaded and the first onGetListItem to calculate the page render time using the MilliSecondsBetween function.
Another example, after every Web Core update, I re-add this code block to the source code of the TWebSocketClient component to be able to read the current state of the socket (CONNECTING, OPEN, CLOSING, CLOSED):
function TSocketClient.GetReadyState: integer; begin if Assigned(FWebSocket) then begin asm var me = this; return me.FWebSocket.readyState; end; end; end;
Properties that would give us these pieces information would be very useful for a developer to be able to work more efficiently towards a good-working application.
We have extended TWebSocketClient. It will be included in the next update.
We are looking at extensions for doing timing as well.