sepinf-inc / IPED

IPED Digital Forensic Tool. It is an open source software that can be used to process and analyze digital evidence, often seized at crime scenes by law enforcement or in a corporate investigation by private examiners.
Other
886 stars 211 forks source link

Use a single source of info to estimate time to finish (#2064) #2073

Closed wladimirleite closed 5 months ago

wladimirleite commented 5 months ago

Fix #2064.

When calculating the estimated time to finish processing, it uses the "Total Volume", the "Processed Volume" and the "Elapsed Time". The negative time happened in the final part of the processing, when the "Processed Volume" was greater than the "Total Volume". It shouldn't happen (the "Processed Volume" should be always less than or equal to the "Total Volume"), but it was because the "Total Volume" used in the calculation may have an outdated value (present in the beginning of the processing, but later incremented). The "Total Volume" presented in GUI was correct (updated).

Information used came from two different sources:

I changed the code a bit to use a single source of information (Statistics), which made things a bit simpler and fixed the issue (as the "Total Volume" used is always updated). I also renamed some variables, which I believe will make the code a bit easier to follow:

indexStart -> processingStart 
taskSize   -> totalVolume
volume     -> processedVolume
discovered -> totalItems
indexed    -> processedItems