2
0
Fork 0

remove old statistics code from network_write.c

This commit is contained in:
Thomas Porzelt 2008-11-23 22:09:51 +01:00
parent 7582742257
commit be8836a57c
1 changed files with 1 additions and 15 deletions

View File

@ -43,24 +43,10 @@ network_status_t network_backend_write(vrequest *vr, int fd, chunkqueue *cq, gof
} else if (0 == r) {
return did_write_something ? NETWORK_STATUS_SUCCESS : NETWORK_STATUS_WAIT_FOR_EVENT;
}
chunkqueue_skip(cq, r);
did_write_something = TRUE;
*write_max -= r;
/* stats */
wrk = vr->con->wrk;
vr->con->wrk->stats.bytes_out += r;
vr->con->stats.bytes_out += r;
/* update 5s stats */
ts = CUR_TS(wrk);
if ((ts - vr->con->stats.last_avg) > 5) {
vr->con->stats.bytes_out_5s_diff = vr->con->stats.bytes_out - vr->con->stats.bytes_out_5s;
vr->con->stats.bytes_out_5s = vr->con->stats.bytes_out;
vr->con->stats.last_avg = ts;
}
} while (r == block_len && *write_max > 0);
return NETWORK_STATUS_SUCCESS;