I have an application that writes logs every time a request is made to it. The date and time information refers to the end time of the function. Using the runtime, we calculate the start time of the request.
Here's what the logs look like:
year | month | day | hour | minute | seconds | Thread | UserName | ExecTime
2014 | 3 | 26 | 8 | 57 | 300 | 1 | file_download | 33.86
2014 | 3 | 26 | 8 | 57 | 45 | 1 | file_upload | 0.359
2014 | 3 | 26 | 8 | 57 | 55 | 1 | folder_browse | 0.234
2014 | 3 | 26 | 8 | 58 | 11 | 1 | sending_email | 0.14
2014 | 3 | 26 | 8 | 58 | 20 | 1 | browsing_favorites | 0.985
2014 | 3 | 26 | 8 | 58 | 29 | 1 | file_download | 0.266
2014 | 3 | 26 | 8 | 58 | 33 | 1 | file_upload | 0.296
2014 | 3 | 26 | 8 | 58 | 37 | 1 | file_zip | 0.25
2014 | 3 | 26 | 8 | 58 | 41 | 1 | view_properties | 0.0
2014 | 3 | 26 | 8 | 58 | 46 | 1 | file_download | 0.187
For illustration only
As the query can span several minutes or even hours, it becomes difficult to calculate each usage of the threads per minute. The following result shows the result that I get after:
Thread | month | day | hour | minute | % Busy
1 | 3 | 26 | 8 | 57 | 0.5
2 | 3 | 26 | 8 | 57 | 0.1
3 | 3 | 26 | 8 | 57 | 0.9
For illustration only
For example, if the request started at 12:30:30 and ended at 12:32:30, the above table would look like this:
Thread | month | day | hour | minute | % Busy
1 | 3 | 26 | 12 | 29 | 0
1 | 3 | 26 | 12 | 30 | 0.5
1 | 3 | 26 | 12 | 31 | 1
1 | 3 | 26 | 12 | 32 | 0.5
1 | 3 | 26 | 12 | 33 | 0
For illustration only
The number of minutes left will be the number of minutes between the first request and the last request that can be found in the logs.
UPDATE
, @TessellatingHeckler :
, , , . perl, powershell java.