httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r723672 - /httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
Date Fri, 05 Dec 2008 09:08:53 GMT
Author: pquerna
Date: Fri Dec  5 01:08:53 2008
New Revision: 723672

URL: http://svn.apache.org/viewvc?rev=723672&view=rev
Log:
Make the frequency with how often we write the stats file a compile time option.
Suggested by: Ruediger Pluem

Modified:
    httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c

Modified: httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c?rev=723672&r1=723671&r2=723672&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c (original)
+++ httpd/httpd/trunk/modules/cluster/mod_heartmonitor.c Fri Dec  5 01:08:53 2008
@@ -22,6 +22,13 @@
 #include "ap_mpm.h"
 #include "scoreboard.h"
 
+
+#ifndef HN_UPDATE_SEC
+/* How often we update the stats file */
+/* TODO: Make a runtime config */
+#define HN_UPDATE_SEC (5)
+#endif
+
 module AP_MODULE_DECLARE_DATA heartmonitor_module;
 
 typedef struct hm_server_t
@@ -322,7 +329,7 @@
 
         now = apr_time_now();
 
-        if (apr_time_sec((now - last)) > 5) {
+        if (apr_time_sec((now - last)) > HN_UPDATE_SECONDS) {
             hm_update_stats(ctx, p);
             apr_pool_clear(p);
             last = now;



Mime
View raw message