Last change
on this file since 9476549 was
32d1383,
checked in by Thierry Delisle <tdelisle@…>, 2 years ago
|
Committing http server when I know it works
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
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 { |
---|
12 | volatile uint64_t maxfd; |
---|
13 | volatile uint64_t close; |
---|
14 | volatile uint64_t error; |
---|
15 | volatile uint64_t calls; |
---|
16 | volatile uint64_t eagain; |
---|
17 | volatile uint64_t tries; |
---|
18 | volatile uint64_t header; |
---|
19 | volatile uint64_t splcin; |
---|
20 | volatile uint64_t splcot; |
---|
21 | struct { |
---|
22 | volatile uint64_t calls; |
---|
23 | volatile uint64_t bytes; |
---|
24 | } avgrd[zipf_cnts]; |
---|
25 | }; |
---|
26 | |
---|
27 | void ?{}( sendfile_stats_t & this ); |
---|
28 | |
---|
29 | void push(sendfile_stats_t & from, sendfile_stats_t & to); |
---|
30 | |
---|
31 | struct acceptor_stats_t { |
---|
32 | volatile uint64_t creates; |
---|
33 | volatile uint64_t accepts; |
---|
34 | volatile uint64_t eagains; |
---|
35 | }; |
---|
36 | |
---|
37 | void ?{}( acceptor_stats_t & this ); |
---|
38 | |
---|
39 | void push(acceptor_stats_t & from, acceptor_stats_t & to); |
---|
40 | |
---|
41 | struct ServerCluster { |
---|
42 | cluster self; |
---|
43 | processor * procs; |
---|
44 | }; |
---|
45 | |
---|
46 | thread StatsPrinter { |
---|
47 | struct { |
---|
48 | __spinlock_t lock; |
---|
49 | sendfile_stats_t send; |
---|
50 | acceptor_stats_t accpt; |
---|
51 | } stats; |
---|
52 | condition_variable(fast_block_lock) var; |
---|
53 | ServerCluster * cl; |
---|
54 | }; |
---|
55 | |
---|
56 | void ?{}( StatsPrinter & this, ServerCluster * cl ); |
---|
57 | void ^?{}( StatsPrinter & mutex this ); |
---|
58 | |
---|
59 | extern StatsPrinter * stats_thrd; |
---|
Note: See
TracBrowser
for help on using the repository browser.