diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2013-03-15 20:00:49 +0000 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2013-03-15 20:00:49 +0000 |
| commit | bac0cb3bbd507400c9dbac03eacbb6c6937efccd (patch) | |
| tree | a985eda8c56309251862e7236dbe4aeaa54df581 /src/event | |
| parent | 23e692b58df18e47f5c8080ce8812ed574d7c4a2 (diff) | |
| download | nginx-bac0cb3bbd507400c9dbac03eacbb6c6937efccd.tar.gz nginx-bac0cb3bbd507400c9dbac03eacbb6c6937efccd.tar.bz2 | |
Status: introduced the "ngx_stat_waiting" counter.
And corresponding variable $connections_waiting was added.
Previously, waiting connections were counted as the difference between
active connections and the sum of reading and writing connections.
That made it impossible to count more than one request in one connection
as reading or writing (as is the case for SPDY).
Also, we no longer count connections in handshake state as waiting.
Diffstat (limited to 'src/event')
| -rw-r--r-- | src/event/ngx_event.c | 6 | ||||
| -rw-r--r-- | src/event/ngx_event.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c index cbae0ee6a..b7205f45b 100644 --- a/src/event/ngx_event.c +++ b/src/event/ngx_event.c @@ -73,6 +73,8 @@ ngx_atomic_t ngx_stat_reading0; ngx_atomic_t *ngx_stat_reading = &ngx_stat_reading0; ngx_atomic_t ngx_stat_writing0; ngx_atomic_t *ngx_stat_writing = &ngx_stat_writing0; +ngx_atomic_t ngx_stat_waiting0; +ngx_atomic_t *ngx_stat_waiting = &ngx_stat_waiting0; #endif @@ -511,7 +513,8 @@ ngx_event_module_init(ngx_cycle_t *cycle) + cl /* ngx_stat_requests */ + cl /* ngx_stat_active */ + cl /* ngx_stat_reading */ - + cl; /* ngx_stat_writing */ + + cl /* ngx_stat_writing */ + + cl; /* ngx_stat_waiting */ #endif @@ -558,6 +561,7 @@ ngx_event_module_init(ngx_cycle_t *cycle) ngx_stat_active = (ngx_atomic_t *) (shared + 6 * cl); ngx_stat_reading = (ngx_atomic_t *) (shared + 7 * cl); ngx_stat_writing = (ngx_atomic_t *) (shared + 8 * cl); + ngx_stat_waiting = (ngx_atomic_t *) (shared + 9 * cl); #endif diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h index 2096da234..93c457c7b 100644 --- a/src/event/ngx_event.h +++ b/src/event/ngx_event.h @@ -511,6 +511,7 @@ extern ngx_atomic_t *ngx_stat_requests; extern ngx_atomic_t *ngx_stat_active; extern ngx_atomic_t *ngx_stat_reading; extern ngx_atomic_t *ngx_stat_writing; +extern ngx_atomic_t *ngx_stat_waiting; #endif |
