diff options
author | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-03-05 00:39:45 +0000 |
---|---|---|
committer | jan <jan@152afb58-edef-0310-8abb-c4023f1b3aa9> | 2007-03-05 00:39:45 +0000 |
commit | baf5682f1a7722ef0d1a380b967960d598f704ce (patch) | |
tree | ca9f2ba5f74bf4aa2bf13b028bf9fcc2160cb05e /src/base.h | |
parent | 354f1edc5632b8494e756b932953f08d66790b8c (diff) | |
download | lighttpd-baf5682f1a7722ef0d1a380b967960d598f704ce.tar.gz |
added time-tracking
* base.h
- added a array of GTimeVal to track timestamps of the different
stages
* network_gthread_aio.c
- added a compile-time define to track the execution-time of a
read()/write() request
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@1705 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/base.h')
-rw-r--r-- | src/base.h | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -91,6 +91,44 @@ typedef unsigned __int32 uint32_t; #include "settings.h" +typedef enum { + TIME_CONNECTION_ACCEPT, + TIME_REQUEST_START, + TIME_BACKEND_CONNECT, + + TIME_BACKEND_SEND_HEADER_START, + TIME_BACKEND_SEND_HEADER_END, + TIME_BACKEND_SEND_CONTENT_START, + TIME_BACKEND_SEND_CONTENT_END, + + TIME_BACKEND_RECV_HEADER_START, + TIME_BACKEND_RECV_HEADER_END, + TIME_BACKEND_RECV_CONTENT_START, + TIME_BACKEND_RECV_CONTENT_END, + + TIME_BACKEND_DISCONNECT, + + TIME_SEND_HEADER_START, + TIME_SEND_HEADER_END, + + TIME_SEND_CONTENT_START, + + TIME_SEND_ASYNC_READ_QUEUED, /* for async-io read */ + TIME_SEND_ASYNC_READ_START, /* for async-io read */ + TIME_SEND_ASYNC_READ_END, /* for async-io read */ + TIME_SEND_ASYNC_READ_END_QUEUED, /* for async-io read */ + + TIME_SEND_WRITE_START, + TIME_SEND_WRITE_END, + + TIME_SEND_CONTENT_END, + + TIME_REQUEST_END, + TIME_CONNECTION_CLOSE, + + TIME_LAST_ELEMENT +} connection_time_field_t; + typedef enum { T_CONFIG_UNSET, T_CONFIG_STRING, T_CONFIG_SHORT, @@ -397,6 +435,10 @@ typedef struct { int in_error_handler; void *srv_socket; /* reference to the server-socket (typecast to server_socket) */ + + /**/ + + GTimeVal timestamps[TIME_LAST_ELEMENT]; } connection; typedef struct { |