]> granicus.if.org Git - apache/commitdiff
Make the frequency with how often we write the stats file a compile time option.
authorPaul Querna <pquerna@apache.org>
Fri, 5 Dec 2008 09:08:53 +0000 (09:08 +0000)
committerPaul Querna <pquerna@apache.org>
Fri, 5 Dec 2008 09:08:53 +0000 (09:08 +0000)
Suggested by: Ruediger Pluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723672 13f79535-47bb-0310-9956-ffa450edef68

modules/cluster/mod_heartmonitor.c

index 876141dca6301d0a8d73f8014035bd85adacd42c..cd07de6a8e17e40803ea03cc8aced48fce9835e5 100644 (file)
 #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;