From e2f4ccd343876d3c25b30ac0df3f9a380a7b9815 Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Mon, 2 Jan 2006 23:15:26 +0000 Subject: [PATCH] added internals for the statistics framework git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@899 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/base.h | 15 +++++++++++++++ src/server.c | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/base.h b/src/base.h index 42f8de98..9d079b45 100644 --- a/src/base.h +++ b/src/base.h @@ -559,6 +559,21 @@ typedef struct server { connections *fdwaitqueue; stat_cache *stat_cache; + + /** + * The status array can carry all the status information you want + * the key to the array is . + * and the values are counters + * + * example: + * fastcgi.backends = 10 + * fastcgi.active-backends = 6 + * fastcgi.backend..load = 24 + * fastcgi.backend..... + * + * fastcgi.backend..disconnects = ... + */ + array *status; fdevent_handler_t event_handler; diff --git a/src/server.c b/src/server.c index 33648be8..9326f844 100644 --- a/src/server.c +++ b/src/server.c @@ -148,6 +148,7 @@ static server *server_init(void) { CLEAN(config_context); CLEAN(config_touched); + CLEAN(status); #undef CLEAN for (i = 0; i < FILE_CACHE_MAX; i++) { @@ -245,6 +246,7 @@ static void server_free(server *srv) { CLEAN(config_context); CLEAN(config_touched); + CLEAN(status); #undef CLEAN joblist_free(srv, srv->joblist);