AW: How long server procesing running

Rudolf Bargholz rudolf at bargholz.ch
Sat Nov 16 07:52:53 UTC 2024


Hi Martin,

This is not easy, as you have no real way of knowing if something might slow down your process while it is running. If the database will slow down during the process, or if your workstation has a change in the CPU load, this might have an effect on the time it takes to process your workflow.

If

  a) you have a process that uses as list as a base structure
  b) each workflow for each list line takes about the same or at least a similar time

you can time each single list process and multiply the number of list lines with the time for each single line time to get an estimation how long your workflow will take. The longer the workflow runs, and the more lines you process, the better the estimation for the total time needed. You need a row to store the following information:

StartDateTime
NumberOfLines
NumberOfLinesProcessed
CurrentDateTime
TotalProcessedSeconds

TotalProcessedSeconds= ddiff(kSeconds, StartDateTime,#D) will return the time in seconds from the start of the process

TotalProcessedSeconds/ NumberOfLinesProcessed will return the time for each line

(NumberOfLines - NumberOfLinesProcessed) * (TotalProcessedSeconds/ NumberOfLinesProcessed) will return the estimated number of seconds for the rest process

Note, if each iteration takes a short time, but you have a lot of lines, and the number of lines/processes are what take time, you might want to limit your working message using a mod()

e.g. 

If mod(NumberOfLinesProcessed,13) = 0
 Redraw working message
End If

The redraw of a working message takes a bit of time, and updating your working message too often might additionally slow down your workflow noticeably. You will have to experiment a bit to find a sweet spot to be able to inform the user regularly, but not too often, so that the working message only redraws every few seconds, depending on how long the process takes.

You might also consider having two messages: one at the beginning, for the first X iterations, where you do not show an estimated end time, and just tell the user that you are calculating the estimated end time, as at the beginning of the workflow you do not have decent information about the average time per line of your workflow, and a second working message that is displayed when you have processed enough lines so that the information about the mean time per line has a significant value, and the estimation of the rest time is viable.

Hope this helps.

Regards

Rudolf Bargholz

-----Ursprüngliche Nachricht-----
Von: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> Im Auftrag von Martin Obongita via omnisdev-en
Gesendet: Freitag, 15. November 2024 19:13
An: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Cc: Martin Obongita <martin.obongita at yahoo.com>
Betreff: How long server procesing running

Can Omnis tell how long a certain method would take to execute? Is there a function or a tool to measure that?
_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 


More information about the omnisdev-en mailing list