Sometime negative values are displayed in the min column of the Connection Times statistics.
I sure will find out why, but the following patch make sure that cannot happen and does not hurt.
Please comments.
If no comments, I will commit it later today.
Thanks,
@@ -1286,9 +1286,9 @@
c->done = apr_time_now(); s.read = c->read; s.starttime = c->start; - s.ctime = (c->connect - c->start) / 1000; - s.time = (c->done - c->start) / 1000; - s.waittime = (c->beginread - c->endwrite) / 1000; + s.ctime = ap_max(0, (c->connect - c->start) / 1000); + s.time = ap_max(0, (c->done - c->start) / 1000); + s.waittime = ap_max(0, (c->beginread - c->endwrite) / 1000); stats[done++] = s; } } @@ -1507,9 +1507,9 @@ c->done = apr_time_now(); s.read = c->read; s.starttime = c->start; - s.ctime = (c->connect - c->start) / 1000; - s.waittime = (c->beginread - c->endwrite) / 1000; - s.time = (c->done - c->start) / 1000; + s.ctime = ap_max(0, (c->connect - c->start) / 1000); + s.waittime = ap_max(0, (c->beginread - c->endwrite) / 1000); + s.time = ap_max(0, (c->done - c->start) / 1000); stats[done++] = s; |
ab.c.patch
Description: Binary data