summaryrefslogtreecommitdiffstats
path: root/modules/cluster
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2008-12-05 10:08:53 +0100
committerPaul Querna <pquerna@apache.org>2008-12-05 10:08:53 +0100
commit7b55419d4ea3ef0ac94b479efae0aa200cd5e05f (patch)
tree02047df53649c28c046aa8620d11f559dd5531c0 /modules/cluster
parentMake hm_ctx_t:keep_running a volatile. (diff)
downloadapache2-7b55419d4ea3ef0ac94b479efae0aa200cd5e05f.tar.xz
apache2-7b55419d4ea3ef0ac94b479efae0aa200cd5e05f.zip
Make the frequency with how often we write the stats file a compile time option.
Suggested by: Ruediger Pluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cluster')
-rw-r--r--modules/cluster/mod_heartmonitor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c
index 876141dca6..cd07de6a8e 100644
--- a/modules/cluster/mod_heartmonitor.c
+++ b/modules/cluster/mod_heartmonitor.c
@@ -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 @@ static void *hm_worker(apr_thread_t *thd, void *data)
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;