Skip to content

Commit

Permalink
lib-http: Track request's first and last send attempt times separately.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Apr 10, 2017
1 parent 1fbeeb3 commit 869fc20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-http/http-client-private.h
Expand Up @@ -97,6 +97,7 @@ struct http_client_request {

struct timeval release_time;
struct timeval submit_time;
struct timeval first_sent_time;
struct timeval sent_time;
struct timeval response_time;
struct timeval timeout_time;
Expand Down
2 changes: 2 additions & 0 deletions src/lib-http/http-client-request.c
Expand Up @@ -1192,6 +1192,8 @@ static int http_client_request_send_real(struct http_client_request *req,
iov[2].iov_len = 2;

req->state = HTTP_REQUEST_STATE_PAYLOAD_OUT;
if (req->first_sent_time.tv_sec == 0)
req->first_sent_time = ioloop_timeval;
req->sent_time = ioloop_timeval;
req->sent_lock_usecs = file_lock_wait_get_total_usecs();
req->sent_global_ioloop_usecs = ioloop_global_wait_usecs;
Expand Down

0 comments on commit 869fc20

Please sign in to comment.