ADT
ast-experimental
pthread-emulation
Last change
on this file since 80d16f8 was ae020ea, checked in by Thierry Delisle <tdelisle@…>, 3 years ago |
Printer now prints max fd and open/closed/live connections.
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[137974ae] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <stdint.h>
|
---|
| 4 |
|
---|
| 5 | #include <locks.hfa>
|
---|
| 6 | #include <thread.hfa>
|
---|
| 7 |
|
---|
| 8 | extern const size_t zipf_sizes[];
|
---|
| 9 | enum { zipf_cnts = 36, };
|
---|
| 10 |
|
---|
| 11 | struct sendfile_stats_t {
|
---|
[ae020ea] | 12 | volatile uint64_t maxfd;
|
---|
| 13 | volatile uint64_t close;
|
---|
[137974ae] | 14 | volatile uint64_t calls;
|
---|
| 15 | volatile uint64_t tries;
|
---|
| 16 | volatile uint64_t header;
|
---|
| 17 | volatile uint64_t splcin;
|
---|
| 18 | volatile uint64_t splcot;
|
---|
| 19 | struct {
|
---|
| 20 | volatile uint64_t calls;
|
---|
| 21 | volatile uint64_t bytes;
|
---|
| 22 | } avgrd[zipf_cnts];
|
---|
| 23 | };
|
---|
| 24 |
|
---|
| 25 | void ?{}( sendfile_stats_t & this );
|
---|
| 26 |
|
---|
| 27 | void push(sendfile_stats_t & from, sendfile_stats_t & to);
|
---|
| 28 |
|
---|
| 29 | struct acceptor_stats_t {
|
---|
| 30 | volatile uint64_t creates;
|
---|
| 31 | volatile uint64_t accepts;
|
---|
| 32 | volatile uint64_t eagains;
|
---|
| 33 | };
|
---|
| 34 |
|
---|
| 35 | void ?{}( acceptor_stats_t & this );
|
---|
| 36 |
|
---|
| 37 | void push(acceptor_stats_t & from, acceptor_stats_t & to);
|
---|
| 38 |
|
---|
[329e26a] | 39 | struct ServerCluster {
|
---|
| 40 | cluster self;
|
---|
| 41 | processor * procs;
|
---|
| 42 | };
|
---|
| 43 |
|
---|
[137974ae] | 44 | thread StatsPrinter {
|
---|
| 45 | struct {
|
---|
| 46 | __spinlock_t lock;
|
---|
| 47 | sendfile_stats_t send;
|
---|
| 48 | acceptor_stats_t accpt;
|
---|
| 49 | } stats;
|
---|
| 50 | condition_variable(fast_block_lock) var;
|
---|
[329e26a] | 51 | ServerCluster * cl;
|
---|
[137974ae] | 52 | };
|
---|
| 53 |
|
---|
[329e26a] | 54 | void ?{}( StatsPrinter & this, ServerCluster * cl );
|
---|
[137974ae] | 55 | void ^?{}( StatsPrinter & mutex this );
|
---|
| 56 |
|
---|
| 57 | extern StatsPrinter * stats_thrd;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.