httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@ebuilt.com>
Subject Re: cvs commit: httpd-test/flood CHANGES flood_easy_reports.c flood_easy_reports.h flood_profile.c flood_profile.h flood_simple_reports.c flood_simple_reports.h
Date Fri, 03 Aug 2001 08:01:13 GMT
Looks ok from the diff, but I have a question:

How do we figure out relative times from the absolutes? For example:
  "How long did it take to connect on this request?"


I remember we discussed this before, and although it doesn't matter to
me what internal representation we have (relateive vs. absolute times),
we have to be able to produce either. I may add another "reporter"
tomorrow that provides this.

-aaron


On Fri, Aug 03, 2001 at 04:55:53AM -0000, jerenkrantz@apache.org wrote:
> jerenkrantz    01/08/02 21:55:53
> 
>   Modified:    flood    CHANGES flood_easy_reports.c flood_easy_reports.h
>                         flood_profile.c flood_profile.h
>                         flood_simple_reports.c flood_simple_reports.h
>   Log:
>   Add better resolution timers (connect, write, read, close).
>   Adjust easy reports to print these timers out.
>   
>   (Aaron, I did this tonight rather than wait until tomorrow because I
>   want to capture this info on some long runs that I will be running
>   overnight.  Sorry!  Let me know if you have any issues with this
>   implementation...)
>   
>   Revision  Changes    Path
>   1.10      +3 -0      httpd-test/flood/CHANGES
>   
>   Index: CHANGES
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/CHANGES,v
>   retrieving revision 1.9
>   retrieving revision 1.10
>   diff -u -r1.9 -r1.10
>   --- CHANGES	2001/08/03 00:24:18	1.9
>   +++ CHANGES	2001/08/03 04:55:53	1.10
>   @@ -1,5 +1,8 @@
>    Changes since milestone-0-1:
>    
>   +* Add better resolution timers (connect, write, read, close).  
>   +  [Justin Erenkrantz]
>   +
>    * A farmer may now be run for an arbitrary amount of time (specified in
>      seconds) rather than a specific number of requests.  [Justin Erenkrantz]
>    
>   
>   
>   
>   1.5       +17 -11    httpd-test/flood/flood_easy_reports.c
>   
>   Index: flood_easy_reports.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_easy_reports.c,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- flood_easy_reports.c	2001/08/03 00:23:21	1.4
>   +++ flood_easy_reports.c	2001/08/03 04:55:53	1.5
>   @@ -71,19 +71,25 @@
>        return APR_SUCCESS;
>    }
>    
>   -apr_status_t easy_process_stats(report_t *report, int verified, request_t *req, response_t
*resp)
>   +apr_status_t easy_process_stats(report_t *report, int verified, request_t *req, response_t
*resp, flood_timer_t *timer)
>    {
>   -    if (verified == FLOOD_VALID) {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " OK %d %s\n", 
>   -                        apr_time_now(), apr_os_thread_current(), req->uri);
>   -    } else if (verified == FLOOD_INVALID) {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " FAIL %d %s\n", 
>   -                        apr_time_now(), apr_os_thread_current(), req->uri);
>   -    } else {
>   -        apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " %d %d %s\n", 
>   -                        apr_time_now(), verified, apr_os_thread_current(), 
>   -                        req->uri);
>   +    apr_file_printf(local_stdout, "%" APR_INT64_T_FMT " %" APR_INT64_T_FMT 
>   +                    " %" APR_INT64_T_FMT " %" APR_INT64_T_FMT,
>   +                    timer->connect, timer->write, timer->read, timer->close);
>   +
>   +    switch (verified)
>   +    {
>   +    case FLOOD_VALID:
>   +        apr_file_printf(local_stdout, " OK ");
>   +        break;
>   +    case FLOOD_INVALID:
>   +        apr_file_printf(local_stdout, " FAIL ");
>   +        break;
>   +    default:
>   +        apr_file_printf(local_stdout, " %d ", verified);
>        }
>   +
>   +    apr_file_printf(local_stdout, "%d %s\n", apr_os_thread_current(), req->uri);
>    
>        return APR_SUCCESS;
>    }
>   
>   
>   
>   1.4       +1 -1      httpd-test/flood/flood_easy_reports.h
>   
>   Index: flood_easy_reports.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_easy_reports.h,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- flood_easy_reports.h	2001/07/25 00:33:31	1.3
>   +++ flood_easy_reports.h	2001/08/03 04:55:53	1.4
>   @@ -64,7 +64,7 @@
>    
>    apr_status_t easy_report_init(report_t **report, config_t *config, const char *profile_name,
apr_pool_t *pool);
>    
>   -apr_status_t easy_process_stats(report_t *report, int verified, request_t *req, response_t
*resp);
>   +apr_status_t easy_process_stats(report_t *report, int verified, request_t *req, response_t
*resp, flood_timer_t *timer);
>    
>    apr_status_t easy_report_stats(report_t *report);
>    
>   
>   
>   
>   1.12      +13 -5     httpd-test/flood/flood_profile.c
>   
>   Index: flood_profile.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_profile.c,v
>   retrieving revision 1.11
>   retrieving revision 1.12
>   diff -u -r1.11 -r1.12
>   --- flood_profile.c	2001/08/01 06:52:25	1.11
>   +++ flood_profile.c	2001/08/03 04:55:53	1.12
>   @@ -607,6 +607,7 @@
>        request_t *req;
>        response_t *resp;
>        socket_t *socket;
>   +    flood_timer_t *timer;
>        apr_status_t stat;
>        int verified;
>    
>   @@ -640,11 +641,14 @@
>        if ((stat = events->socket_init(&socket, pool)) != APR_SUCCESS)
>            return stat;
>    
>   +    timer = apr_palloc(pool, sizeof(flood_timer_t));
>   +
>        do {
>            if ((stat = events->get_next_url(&req, profile)) != APR_SUCCESS)
>                return stat;
>    
>            /* sample timer "main" */
>   +        timer->connect = apr_time_now();
>    
>            if ((stat = events->begin_conn(socket, req, pool)) != APR_SUCCESS) {
>                apr_file_printf(local_stderr, "open request failed.\n");
>   @@ -665,6 +669,7 @@
>            }
>    
>            /* sample timer "send_req" */
>   +        timer->write = apr_time_now();
>    
>            if ((stat = events->recv_resp(&resp, socket, pool)) != APR_SUCCESS)
{
>                apr_file_printf(local_stderr, "receive request failed.\n");
>   @@ -672,6 +677,7 @@
>            }
>    
>            /* sample timer "recv_resp" */
>   +        timer->read = apr_time_now();
>    
>            if ((stat = events->postprocess(profile, req, resp)) != APR_SUCCESS) {
>                apr_file_printf(local_stderr, "postprocessing failed.\n");
>   @@ -683,17 +689,19 @@
>                return stat;
>            }
>    
>   +        if ((stat = events->end_conn(socket, req, resp)) != APR_SUCCESS) {
>   +            apr_file_printf(local_stderr, "Unable to end the connection.\n");
>   +            return stat;
>   +        }
>   +
>            /* sample timer "full_resp" */
>   +        timer->close = apr_time_now();
>    
>   -        if ((stat = events->process_stats(report, verified, req, resp)) != APR_SUCCESS)
{
>   +        if ((stat = events->process_stats(report, verified, req, resp, timer))
!= APR_SUCCESS) {
>                apr_file_printf(local_stderr, "Unable to process statistics.\n");
>                return stat;
>            }
>    
>   -        if ((stat = events->end_conn(socket, req, resp)) != APR_SUCCESS) {
>   -            apr_file_printf(local_stderr, "Unable to end the connection.\n");
>   -            return stat;
>   -        }
>    
>            if ((stat = events->request_destroy(req)) != APR_SUCCESS) {
>                apr_file_printf(local_stderr, "Error cleaning up request.\n");
>   
>   
>   
>   1.6       +10 -1     httpd-test/flood/flood_profile.h
>   
>   Index: flood_profile.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_profile.h,v
>   retrieving revision 1.5
>   retrieving revision 1.6
>   diff -u -r1.5 -r1.6
>   --- flood_profile.h	2001/08/01 03:10:37	1.5
>   +++ flood_profile.h	2001/08/03 04:55:53	1.6
>   @@ -138,6 +138,15 @@
>    };
>    typedef struct response_t response_t;
>    
>   +/* Define a timer. */
>   +struct flood_timer_t {
>   +    apr_time_t connect;
>   +    apr_time_t write;
>   +    apr_time_t read;
>   +    apr_time_t close;
>   +};
>   +typedef struct flood_timer_t flood_timer_t;
>   +
>    /**
>     * profile_t holds all stateful data needed during the running of
>     * a test. For example, if we wanted to test a single URL 10 times
>   @@ -221,7 +230,7 @@
>         * per HTTP transaction, and immediatly after "verify_resp" is called.
>         * Returns: boolean status of this function.
>         */
>   -    apr_status_t (*process_stats)(report_t *report, int verified, request_t *req,
response_t *resp);
>   +    apr_status_t (*process_stats)(report_t *report, int verified, request_t *req,
response_t *resp, flood_timer_t *timer);
>    
>        /**
>         * Generate a report on all statistical information
>   
>   
>   
>   1.5       +1 -1      httpd-test/flood/flood_simple_reports.c
>   
>   Index: flood_simple_reports.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_simple_reports.c,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- flood_simple_reports.c	2001/08/01 03:10:37	1.4
>   +++ flood_simple_reports.c	2001/08/03 04:55:53	1.5
>   @@ -78,7 +78,7 @@
>        return APR_SUCCESS;
>    }
>    
>   -apr_status_t simple_process_stats(report_t *report, int verified, request_t *req,
response_t *resp)
>   +apr_status_t simple_process_stats(report_t *report, int verified, request_t *req,
response_t *resp, flood_timer_t *timer)
>    {
>        simple_report_t *sr = (simple_report_t*)report;
>    
>   
>   
>   
>   1.4       +1 -1      httpd-test/flood/flood_simple_reports.h
>   
>   Index: flood_simple_reports.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/flood/flood_simple_reports.h,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- flood_simple_reports.h	2001/07/25 00:33:31	1.3
>   +++ flood_simple_reports.h	2001/08/03 04:55:53	1.4
>   @@ -64,7 +64,7 @@
>    
>    apr_status_t simple_report_init(report_t **report, config_t *config, const char *profile_name,
apr_pool_t *pool);
>    
>   -apr_status_t simple_process_stats(report_t *report, int verified, request_t *req,
response_t *resp);
>   +apr_status_t simple_process_stats(report_t *report, int verified, request_t *req,
response_t *resp, flood_timer_t *timer);
>    
>    apr_status_t simple_report_stats(report_t *report);
>    
>   
>   
>   


Mime
View raw message