Use the "recent time" cache to optimize timestamp generation for

the httpd error log

Background: According to some profile data that we collected on Solaris,
half the run time of ap_log_rerror() was spent in localtime(3).   With
this change, the recent-time cache ensures that the error logger won't
cause more than one localtime() call per second, no matter how high the
error rate is.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian Pane
2002-03-17 05:13:12 +00:00
parent f4a27d9935
commit e3bfcb1430
4 changed files with 55 additions and 1 deletions

View File

@ -102,6 +102,13 @@ AP_DECLARE(apr_status_t) ap_explode_recent_gmt(apr_time_exp_t *tm,
apr_time_t t);
/**
* format a recent timestamp in the ctime() format.
* @param date_str String to write to.
* @param t the time to convert
*/
AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t);
#ifdef __cplusplus
}
#endif