| 1 | [[PageOutline]] |
| 2 | |
| 3 | = Upload Statistics Monitoring in BOINC = |
| 4 | |
| 5 | Target : To Keep track of the statistics of how long it takes to upload files, |
| 6 | and to report results and then to use that info to improve compute deadlines. |
| 7 | |
| 8 | The absolute time taken for upload of files is calculated |
| 9 | (i.e. from the moment first file upload begins to the point where all uploads have completed). |
| 10 | In order to calculate this time, in class **ACTIVE_TASK**, |
| 11 | a variable is added as //bool first_upload_started//. |
| 12 | Initially its value is set to **false**. |
| 13 | Now in the function //upload_notify_app(const FILE_INFO* fip, const FILE_REF* frp)//, |
| 14 | after //send_upload_file_status = true//, if //first_upload_started// is **false**, |
| 15 | then it is set to **true** and the current time is recorded. |
| 16 | This acts as the start time. |
| 17 | Then for the end time, in class **RESULT**, |
| 18 | as the return value of //is_upload_done// becomes **true**, |
| 19 | that point of time is the end time, and the difference between these times acts as the upload time. |
| 20 | With this value of time, |
| 21 | an exponential average of times is maintained in order to get a usable value for improving compute deadlines. |