mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Log the duration of garbage collection at level 3.
This commit is contained in:
parent
5c4733f1ab
commit
5448b3fc26
@ -167,7 +167,7 @@ static apr_status_t modsecurity_tx_cleanup(void *data) {
|
||||
int collect_garbage = 0;
|
||||
int i;
|
||||
char *my_error_msg = NULL;
|
||||
apr_time_t time_before;
|
||||
apr_time_t time_before, duration;
|
||||
|
||||
if (msr == NULL) return APR_SUCCESS;
|
||||
|
||||
@ -192,8 +192,13 @@ static apr_status_t modsecurity_tx_cleanup(void *data) {
|
||||
collections_remove_stale(msr, te[i].key);
|
||||
}
|
||||
}
|
||||
|
||||
duration = apr_time_now() - time_before;
|
||||
msr->time_storage_write += duration;
|
||||
|
||||
msr->time_storage_write += apr_time_now() - time_before;
|
||||
if (msr->txcfg->debuglog_level >= 3) {
|
||||
msr_log(msr, 3, "Garbage collection took %" APR_TIME_T_FMT " microseconds.", duration);
|
||||
}
|
||||
|
||||
/* Multipart processor cleanup. */
|
||||
if (msr->mpd != NULL) multipart_cleanup(msr);
|
||||
|
@ -775,7 +775,7 @@ void msre_engine_destroy(msre_engine *engine) {
|
||||
*/
|
||||
#if defined(PERFORMANCE_MEASUREMENT)
|
||||
|
||||
#define PERFORMANCE_MEASUREMENT_LOOP 1000
|
||||
#define PERFORMANCE_MEASUREMENT_LOOP 5000
|
||||
|
||||
static apr_status_t msre_ruleset_process_phase_(msre_ruleset *ruleset, modsec_rec *msr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user