aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_slab.h
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2016-12-07 22:25:37 +0300
committerRuslan Ermilov <ru@nginx.com>2016-12-07 22:25:37 +0300
commit9ccf719be6b922715fc6bdfabf24742eeec46ba4 (patch)
tree68aafea903532437b16b9c4bc3d7dd22e7599584 /src/core/ngx_slab.h
parent366f131c382d877bca19545af258e221d59bfd66 (diff)
downloadnginx-9ccf719be6b922715fc6bdfabf24742eeec46ba4.tar.gz
nginx-9ccf719be6b922715fc6bdfabf24742eeec46ba4.zip
Slab: slots statistics.
For each slot, the number of total and used entries, as well as the number of allocation requests and failures, are tracked.
Diffstat (limited to 'src/core/ngx_slab.h')
-rw-r--r--src/core/ngx_slab.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/ngx_slab.h b/src/core/ngx_slab.h
index 2922a80c7..bd193217b 100644
--- a/src/core/ngx_slab.h
+++ b/src/core/ngx_slab.h
@@ -23,6 +23,15 @@ struct ngx_slab_page_s {
typedef struct {
+ ngx_uint_t total;
+ ngx_uint_t used;
+
+ ngx_uint_t reqs;
+ ngx_uint_t fails;
+} ngx_slab_stat_t;
+
+
+typedef struct {
ngx_shmtx_sh_t lock;
size_t min_size;
@@ -32,6 +41,8 @@ typedef struct {
ngx_slab_page_t *last;
ngx_slab_page_t free;
+ ngx_slab_stat_t *stats;
+
u_char *start;
u_char *end;