I have to implement a progressbar that show the progress of a report generation, the problem is that i have to represent the percentage of the report progression based on event generated by the generation but without first knowing the total amount of event, so for example the report generation sends the following event(phase) :
- Starting Report generation
- Start Query execution
- End Query execution
- Start Report Rendering
- End Report Rendering
- End Report Generation
In this example there are in total 3 task and 6 events, i don't know the total number of task but i know that the total number of events is twice respect the number of tasks.
I don't know which events are present and how many they are , but i have to represent the progression with a progress bar so with a number between 0 and 100 .
How can it be calculated ? Whats the best way to represents the progression ?