-1

I'am trying to run real-life experiment for an application in Raspberry Pi, and I need to estimate or predicate the execution time for the application. in other words, before execution/ run the task i need to know how long (roughly) this task/app going to take to get the result back. I have identified several techniques and works that have been done before. but most of it are simulation work which doesn't work with real-life experiment. does anyone can help me with any idea or technique (No code). thank you in advance

Ali Jaddoa
  • 11
  • 1
  • 4

2 Answers2

0

Estimating the execution time of an application or function is going to be difficult in any context. You might want to look up the halting problem for some insight to why. It's impossible to determine whether a given program will finish executing, and therefore, you can't really tell how long a given program will take to finish executing.

For general computing, varying hardware capabilities of any given system will always have an effect on the execution time of a program. Raspberry Pi is a little more discrete than that, and therefore more predictable in that sense, but those specifications will not always be consistent across its various versions. That adds to the complexity of determining a run time.

Practically, the most reliable way to determine how long a process will take would be to just run it and time it. If you absolutely need predicted times for something, you might be able to do a bit of a composite estimate - time the smaller chunks of the application separately, and then use those to determine how long you expect the application as a whole to run. For most situations, though, it would be much faster to just run the program itself rather than trying to predict it.

movip1991
  • 86
  • 5
-1

Store the time before and after the execution ? Then you could know the execution time

Liem Ly Quan
  • 61
  • 1
  • 5
  • thank you for the reply, but i need to estimate it in advance. – Ali Jaddoa Jan 02 '19 at 15:29
  • What would the task be about ? I could imagine that there are cases where is is totally clueless about the time of completion of a task in advance (e.g: some network request). So know what it is about may help in prediction – Liem Ly Quan Jan 02 '19 at 15:36
  • consider the application is face detection, so before I send the chosen image to the application I need to know, how long detecting faces in the image going to take. – Ali Jaddoa Jan 02 '19 at 15:57