Logging time taken to handle request

It is possible to measure the amount of time it takes for Portus to handle a request. This time can be measured in seconds or microseconds.
To do this, stop Portus and edit the
- [install_dir]/apache2/conf/httpd.conf ( *nix )
- [install_dir]/Apache22/conf/httpd.conf ( windows )
- [install_pds].CONF( HTCONF ) (z/OS and z/VSE)
Add a new LogFormat directive. In this case, we want to display the first line of the request (%r) and the time in microseconds (%D). The name of our format will be "timer"
LogFormat "\"%r\" %D " timer
To enable this new format, change the CustomLog directive to use this format. For the sake of simplicity, it is recommended to comment out any existing CustomLog directives.
CustomLog logs/access_log timer
If Portus is running on z/OS or z/VSE, submit the job which copies the HTCONF to the PFS.
Now start Portus. When a request is handled, our new format will be written to the access log.
E.g
"GET /Natural_Driver_ASGQE_QEREPEAT?WSDL HTTP/1.1" 21155
In plain language, this means a GET for a Natural WSDL took 21155 microseconds, approx 0.02 seconds.
References :
Stop and Start Portus
LogFormat Directive
Custom Log Formats
CustomLog Directive
To do this, stop Portus and edit the
- [install_dir]/apache2/conf/httpd.conf ( *nix )
- [install_dir]/Apache22/conf/httpd.conf ( windows )
- [install_pds].CONF( HTCONF ) (z/OS and z/VSE)
Add a new LogFormat directive. In this case, we want to display the first line of the request (%r) and the time in microseconds (%D). The name of our format will be "timer"
LogFormat "\"%r\" %D " timer
To enable this new format, change the CustomLog directive to use this format. For the sake of simplicity, it is recommended to comment out any existing CustomLog directives.
CustomLog logs/access_log timer
If Portus is running on z/OS or z/VSE, submit the job which copies the HTCONF to the PFS.
Now start Portus. When a request is handled, our new format will be written to the access log.
E.g
"GET /Natural_Driver_ASGQE_QEREPEAT?WSDL HTTP/1.1" 21155
In plain language, this means a GET for a Natural WSDL took 21155 microseconds, approx 0.02 seconds.
References :
Stop and Start Portus
LogFormat Directive
Custom Log Formats
CustomLog Directive