diff options
Diffstat (limited to 'src/http_decoder_stat.cpp')
| -rw-r--r-- | src/http_decoder_stat.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http_decoder_stat.cpp b/src/http_decoder_stat.cpp index 160353b..f616658 100644 --- a/src/http_decoder_stat.cpp +++ b/src/http_decoder_stat.cpp @@ -12,6 +12,8 @@ static const struct hd_stat_config_tuple g_httpd_stat_tuple[HTTPD_STAT_MAX] = {HTTPD_STAT_TCP_SEG_S2C, "tcp_seg_s2c"}, {HTTPD_STAT_HEADERS_C2S, "headers_c2s"}, {HTTPD_STAT_HEADERS_S2C, "headers_s2c"}, + {HTTPD_STAT_ZIP_BYTES, "zip_bytes"}, + {HTTPD_STAT_UNZIP_BYTES, "unzip_bytes"}, {HTTPD_STAT_URL_BYTES, "url_bytes"}, {HTTPD_STAT_SESSION_NEW, "session_new"}, {HTTPD_STAT_SESSION_FREE, "session_free"}, @@ -55,6 +57,10 @@ static void *httpd_stat_timer_thread(void *arg) int http_decoder_stat_init(struct http_decoder_stat *hd_stat, int thread_max, int stat_interval_pkts, int stat_interval_time) { assert(sizeof(g_httpd_stat_tuple)/sizeof(struct hd_stat_config_tuple) == HTTPD_STAT_MAX); + if(sizeof(g_httpd_stat_tuple)/sizeof(struct hd_stat_config_tuple) != HTTPD_STAT_MAX){ + fprintf(stderr, "enum http_decoder_stat_type number not match with g_httpd_stat_tuple!"); + return -1; + } hd_stat->fse = fieldstat_easy_new(thread_max, "http_decoder_statistics", NULL, 0); if (NULL == hd_stat->fse) { |
