ASF Bugzilla – Attachment 24468 Details for
Bug 48115
Duration to receive the request, generate response, and send back to the client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
a patch to include duration in apache notes
mod_proxy_ajp_duration_as_notes.patch (text/plain), 2.27 KB, created by
mike tsai
on 2009-11-03 16:04:59 UTC
(
hide
)
Description:
a patch to include duration in apache notes
Filename:
MIME Type:
Creator:
mike tsai
Created:
2009-11-03 16:04:59 UTC
Size:
2.27 KB
patch
obsolete
>--- mod_proxy_ajp.c 2009-11-03 14:59:23.000000000 -0800 >+++ /sandbox/b-server-3-4/srcroot/svr/lib/common/lib/apache/tivo_proxy_ajp/mod_tivo_proxy_ajp.c 2009-11-03 15:37:20.000000000 -0800 >@@ -164,6 +164,10 @@ > apr_uri_t *uri, > char *url, char *server_portstr) > { >+ (void) origin; >+ (void) url; >+ (void) server_portstr; >+ > apr_status_t status; > int result; > apr_bucket *e; >@@ -199,6 +203,8 @@ > maxsize = AJP_MSG_BUFFER_SZ; > maxsize = APR_ALIGN(maxsize, 1024); > >+ apr_time_t ajp_start = apr_time_now(); >+ > /* > * Send the AJP request to the remote server > */ >@@ -322,6 +328,10 @@ > } > } > >+ /* Time for client to send request to us and us to tomcat */ >+ apr_time_t ajp_request_sent = apr_time_now(); >+ apr_table_setn(r->notes, "ajp_send_request_duration", apr_ltoa(p, ajp_request_sent - ajp_start)); >+ > /* read the response */ > conn->data = NULL; > status = ajp_read_header(conn->sock, r, maxsize, >@@ -345,6 +355,11 @@ > } > return HTTP_INTERNAL_SERVER_ERROR; > } >+ >+ /* Time to generate the response */ >+ apr_time_t ajp_response_start = apr_time_now(); >+ apr_table_setn(r->notes, "ajp_response_create_duration", apr_ltoa(p, ajp_response_start - ajp_request_sent)); >+ > /* parse the reponse */ > result = ajp_parse_type(r, conn->data); > output_brigade = apr_brigade_create(p, r->connection->bucket_alloc); >@@ -597,11 +612,15 @@ > ap_pass_brigade(r->output_filters, output_brigade); > > apr_brigade_destroy(output_brigade); >- >+ > if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) { > conn->close++; > } >- >+ >+ /* Time to send the response back to the client */ >+ apr_time_t ajp_response_sent = apr_time_now(); >+ apr_table_setn(r->notes, "ajp_send_response_duration", apr_ltoa(p, ajp_response_sent - ajp_response_start)); >+ apr_table_setn(r->notes, "ajp_lifetime", apr_ltoa(p, ajp_response_sent - ajp_start)); > return rv; > } > >@@ -717,6 +736,7 @@ > > static void ap_proxy_http_register_hook(apr_pool_t *p) > { >+ (void) p; > proxy_hook_scheme_handler(proxy_ajp_handler, NULL, NULL, APR_HOOK_FIRST); > proxy_hook_canon_handler(proxy_ajp_canon, NULL, NULL, APR_HOOK_FIRST); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48115
: 24468