could I ask for help in determining the calculation of the remaining time needed to complete the process,
diskFolder ---> subFolder1 (500 files, averageSize 15kB)
---> subFolder2 (75T files, averageSize 3kB)
---> subFolder3 (120T files, averageSize 2kB)
---> subFolder4 (50t files, averageSize 3kB)
---> subFolder21(5T files, averageSize 4kB)
cca 1,25M files at size 95MB,
I would like to download these files and then save to db, but transfers rate <= 30kB/s (vpn) and available during working hours, ()
1/ I know the number of files and their final size (per folder, subforlders too),
2/ I think about using two threads,
- the first to create listArray1 subFoldersName, fileName, isExist, savedDb, timestampt
this one will to prepare contents for next subFolder and will await the completion of the second thread
- the second (only in case of 1st. ends, or ends with success) to copy listArray1 to listArray2
runs 1.st thread again
starts to download files and store them in db
3/ know the final number of files in the diskFolder, also for subFolder,
know the final size of files in diskFolder, whether for subFolder,
4/ know to convert/express these values in percentage format
and my question is how, how way to discover the endpoint:
- time remaining for subFolder
- time remaining for the entire diskFolder
1/ calculate by loadedSize(but there are bit v.s. byte 8/10) ???
2/ calculate by No.file(in pct forms) v.s. final No. from subFolder (or diskFolder) ???
3/ must I to combine loadedSize with loadedFilesNo (for final calculations about diskFolder status) ???