source: benchmark/io/http/printer.hfa @ 9476549

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
8extern const size_t zipf_sizes[];
9enum { zipf_cnts = 36, };
10
11struct 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
27void ?{}( sendfile_stats_t & this );
28
29void push(sendfile_stats_t & from, sendfile_stats_t & to);
30
31struct acceptor_stats_t {
32        volatile uint64_t creates;
33        volatile uint64_t accepts;
34        volatile uint64_t eagains;
35};
36
37void ?{}( acceptor_stats_t & this );
38
39void push(acceptor_stats_t & from, acceptor_stats_t & to);
40
41struct ServerCluster {
42        cluster self;
43        processor    * procs;
44};
45
46thread 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
56void ?{}( StatsPrinter & this, ServerCluster * cl );
57void ^?{}( StatsPrinter & mutex this );
58
59extern StatsPrinter * stats_thrd;
Note: See TracBrowser for help on using the repository browser.