Hi Team,
I would develop some performance logs in a custom datasource pivot, the use cases are:
What is the best aproach for develop it ?
Thanks in advanced
Massimo
Hello, Massimo!
Thank you for your question.
Could you please provide us with more details about the processes you want to measure the performance of?
With this information, we could give you more case-specific suggestions.
From our perspective, server-side performance measuring is worth more attention. The main reason is that performance on the client side always depends on the capabilities of the client's machine and on the network connection quality as well.
Looking forward to hearing from you.
Regards,
Solomiia
Hello Solomiia,
it would be nice to have the time of those usecases, for example :
i hope i'm making myself clear
regards,
Massimo
Hello, Massimo!
Thank you for the details about your use case.
Kindly note that you can achieve the desired behavior using our runningquery and querycomplete events.
The algorithm is the following:
1. Start the timer when runningquery
event is triggered.
2.(optional) Output your request to the console using customizeAPIRequest()
API call: https://www.flexmonster.com/api/customizeapirequest/.
3. Stop the timer on querycomplete
.
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/n3sgmb5v/.
You can filter/expand/etc. the data and open the Dev Console(press F12) to check out the tracked time.
Hope you will find this answer helpful.
Kind regards,
Solomiia
Hi Solomiia,
i've some doubts about your reply, the events aftergriddraw and beforegriddraw are the events about grid rendering but in the example apparently the beforegriddraw and aftergriddraw are triggered after the querycomplete, so we don't estimate that time.
How can i calcolate the logs with customizeAPIRequest()? CustomizeAPIRequest is usefull only as "start request event" but we don't have any "end request event".
Thanks in advance
Massimo
Hello, Massimo!
Thank you for your response.
It is true that we don't track the time for grid rendering in our example. This was done because the time for rendering is very insignificant in comparison to the time spent communicating with the server, so we think it is okay to ignore it.
In case you want to track grid rendering, here is the typical events flow:
customizeAPIRequest()
is executed firs.runningQuery
event is triggered.queryerror
or querycomplete
.beforegriddraw
is triggered.aftergriddraw
is called. Please note that it could be called more than once for each grid rendering.
You can follow this flow to include time for grid rendering in your performance measuring, but our suggestion would be to skip measuring the time taken for rendering.
Hope it helps.
Looking forward to your response.
Kind regards,
Solomiia
Hello, Massimo!
Hope you are doing well.
Our team is wondering if you had a chance to try the suggested approach to measure the performance.
Could you please let us know if it was helpful?
Looking forward to hearing from you.
Regards,
Solomiia
Hello, Massimo!
Hope you are having a great week.
Just checking in to ask if the suggested approach was helpful in measuring the performance.
Looking forward to your response.
Kind regards,
Solomiia
Hi Solomiia ,
I confirm the logs work !
Kind regards,
Massimo
Hello, Massimo!
Thank you for your feedback.
We are glad to hear that the suggested approach works for you.
You are welcome to contact us in case of any other questions.
Best regards,
Solomiia