Re: Algorithm for determining % complete of a program



mross462@xxxxxxxxx wrote:

Hello all,

I'm wondering if there someone could help me investigate an algorithm
for determining the progression status (% complete) of an application
that I'm currently working on. It currently has 4 phases where
different data can be obtained from the program to obtain this
progression status. The application is devided into the following sub
processes, with their corresponding data references.

1. Intialization of objects. (# of types of objects are known)
2. Reading and validating each member of a particular object from a
file. (# of bytes in file read)
3. Validating objects with common values (# of objects with common
values known)
4. Writing a file with the validity tags and addresses of objects (Same
as above)
5. Removing all objects and clearing memory (same as above)

If anyone could point me in a good direction, it would be appreciated.

Thanks

You know in advance there are 5 tasks, T, so percent complete is
totalTasksComplete / T.

Obtain current totalTasksComplete (percent of all tasks complete) by having
each task report it's x / n complete -- accumulate this value in
totalTasksComplete.

This setup has the requirement that you know in advance the total number of
tasks -- but knowing in advance each task's n is not neccessary as each
task simply returns a fraction x / n up to 1 / 1 signifying the task is
complete -- and each task must have some sort of callback installed via
which x / n complete is reported to the progress reporting
thread/interface.

I've implemented this with a proxy between tasks reporting, and reporter
interface(s). Any progress reporting interface registers with the proxy to
receive task reports from task routines. If there's no interface
registered, the proxy simply discards the task reports -- that is, tasks
report their x / n to the proxy. This setup also provides a means to count
the total number of tasks, T, being reported to it -- on a test run -- so
totalTasksComplete / T, in the final program, can be computed, without
having to keep track of what all is reporting thoughout your code -- this
is good, or bad, depending on your perspective of course, but there's
nothing preventing a more rigorous accounting of reporting routines if
that's what you want.

The down side is, scattered reporting calls throughout code -- only in
"tasks" on which reports are desired though. By the same token, the up
side is, the calls can be scattered anywhere task reports might be desired
regardless of whether the reports are actually ever used. You could even
add task identifier parameters, include, and exclude as desired adjusting
progress calculation, and reporting detail accordingly. Tasks can be
further divided into to subtasks, with each task reporting fractions, of
fractions of task complete, and so on... So it's possible to get an
extremely smooth, and accurate progress bar.

The more traditional means of setting up a callback hook with a given task
is preferable -- that way the task only reports if there's a callback
registered, though it still has to test for that -- but the presently
described way works regardless of whether the language supports function
pointers.

Actually, isn't there, or wasn't there such, or similar ADT in Delphi. I
have an implementation in the Windows database programming language,
Paradox.

Bryan

.



Relevant Pages

  • RE: From % Complete to EVM
    ... If you poke around on my blog enough, ... since you have one resource and it costs $1/hr this is the ... I want to move into EVM reporting with a Gantt chart and S Curve. ... Delete all progress. ...
    (microsoft.public.project)
  • Re: Milestones
    ... milestones and reporting on the answer to that question. ... deliverables, you have a really easy means of reporting on progress ...
    (microsoft.public.project)
  • Re: Report progess during black box process
    ... I am reporting to the user the progress while rows are added, ... reported until the sort finishes, which can take more than a minute ... If you read the documentation on BackgroundWorker (see ReportProgress ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Reporting Mode
    ... If you are using the managed time periods feature of Project Server 2003, ... then your company needs to develop a standard procedure for progress ... reporting and when managed time periods are closed. ...
    (microsoft.public.project.pro_and_server)
  • Re: Internet Usage Monitoring
    ... >> I am trying to put together a poor man's solution to reporting on ... >> internet browsing by users. ... Have you thought about using a Proxy with content filtering? ...
    (comp.security.firewalls)