implementation of the function who computes uptime percentage