Closed sarojcare closed 7 years ago
The 500 or 400 Errrors Per Minutes calculation logic has the issue. Here is the logic used for this calculation.
(delta500 / apr_time_sec(deltaTime)) * 60
Here delta400 and delta500 is declared as apr_uint32_t.
When Apache server generates 500/400 error in every second, delta500=1 and deltaTime=1 and it becomes (1/1)*60=60 which is the expected value.
But when Apache server generates 500 error in every 3 seconds The delta500=1 and deltaTime=3 and it is evaluated to (1/3)*60=0.
Also fix the comment
The 500 or 400 Errrors Per Minutes calculation logic has the issue. Here is the logic used for this calculation.
Here delta400 and delta500 is declared as apr_uint32_t.
When Apache server generates 500/400 error in every second, delta500=1 and deltaTime=1 and it becomes (1/1)*60=60 which is the expected value.
But when Apache server generates 500 error in every 3 seconds The delta500=1 and deltaTime=3 and it is evaluated to (1/3)*60=0.