Commit 8a22dbf5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Account for all attempted fetches.

Update some VSC descriptions while at it.
parent 49a42aa1
...@@ -576,6 +576,8 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req) ...@@ -576,6 +576,8 @@ cnt_fetch(struct sess *sp, struct worker *wrk, struct req *req)
need_host_hdr = !http_GetHdr(bo->bereq, H_Host, NULL); need_host_hdr = !http_GetHdr(bo->bereq, H_Host, NULL);
wrk->acct_tmp.fetch++;
i = FetchHdr(sp, need_host_hdr, req->objcore == NULL); i = FetchHdr(sp, need_host_hdr, req->objcore == NULL);
/* /*
* If we recycle a backend connection, there is a finite chance * If we recycle a backend connection, there is a finite chance
...@@ -902,7 +904,6 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req) ...@@ -902,7 +904,6 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
HSH_Ref(req->obj->objcore); HSH_Ref(req->obj->objcore);
VBO_DerefBusyObj(wrk, &req->busyobj); VBO_DerefBusyObj(wrk, &req->busyobj);
wrk->acct_tmp.fetch++;
sp->step = STP_PREPRESP; sp->step = STP_PREPRESP;
return (0); return (0);
} }
......
...@@ -147,53 +147,57 @@ VSC_F(backend_retry, uint64_t, 0, 'a', ...@@ -147,53 +147,57 @@ VSC_F(backend_retry, uint64_t, 0, 'a',
"" ""
) )
VSC_F(fetch_head, uint64_t, 1, 'a', /*---------------------------------------------------------------------
"Fetch head", * Backend fetch statistics
"" */
VSC_F(fetch_head, uint64_t, 1, 'c',
"Fetch no body (HEAD)",
"beresp with no body because the request is HEAD."
) )
VSC_F(fetch_length, uint64_t, 1, 'a', VSC_F(fetch_length, uint64_t, 1, 'c',
"Fetch with Length", "Fetch with Length",
"" "beresp with Content-Length."
) )
VSC_F(fetch_chunked, uint64_t, 1, 'a', VSC_F(fetch_chunked, uint64_t, 1, 'c',
"Fetch chunked", "Fetch chunked",
"" "beresp with Chunked."
) )
VSC_F(fetch_eof, uint64_t, 1, 'a', VSC_F(fetch_eof, uint64_t, 1, 'c',
"Fetch EOF", "Fetch EOF",
"" "beresp with EOF from lack of other info."
) )
VSC_F(fetch_bad, uint64_t, 1, 'a', VSC_F(fetch_bad, uint64_t, 1, 'c',
"Fetch had bad headers", "Fetch bad T-E",
"" "beresp failed due to unknown Transfer-Encoding."
) )
VSC_F(fetch_close, uint64_t, 1, 'a', VSC_F(fetch_close, uint64_t, 1, 'c',
"Fetch wanted close", "Fetch wanted close",
"" "beresp with EOF due to Connection: Close."
) )
VSC_F(fetch_oldhttp, uint64_t, 1, 'a', VSC_F(fetch_oldhttp, uint64_t, 1, 'c',
"Fetch pre HTTP/1.1 closed", "Fetch pre HTTP/1.1 closed",
"" "beresp with EOF due to HTTP < 1.1"
)
VSC_F(fetch_zero, uint64_t, 1, 'a',
"Fetch zero len",
""
) )
VSC_F(fetch_failed, uint64_t, 1, 'a', VSC_F(fetch_zero, uint64_t, 1, 'c',
"Fetch failed", "Fetch zero len body",
"" "beresp with EOF due to keep-live but neither Chunked or Len."
) )
VSC_F(fetch_1xx, uint64_t, 1, 'a', VSC_F(fetch_1xx, uint64_t, 1, 'c',
"Fetch no body (1xx)", "Fetch no body (1xx)",
"" "beresp with no body because of 1XX response."
) )
VSC_F(fetch_204, uint64_t, 1, 'a', VSC_F(fetch_204, uint64_t, 1, 'c',
"Fetch no body (204)", "Fetch no body (204)",
"" "beresp with no body because of 204 response."
) )
VSC_F(fetch_304, uint64_t, 1, 'a', VSC_F(fetch_304, uint64_t, 1, 'c',
"Fetch no body (304)", "Fetch no body (304)",
"" "beresp with no body because of 304 response."
)
VSC_F(fetch_failed, uint64_t, 1, 'c',
"Fetch body failed",
"beresp body fetch failed."
) )
/*--------------------------------------------------------------------- /*---------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment